module SwotCollectionMethods

def all_domains

Returns an array of domain strings.
def all_domains
  each_domain.map(&:to_s)
end

def each_domain

returns a Enumerator object with Swot instances if no block is given

include blacklisted or ACADEMIC_TLDS domains.
Yields a Swot instance for every domain under lib/domains. Does not
def each_domain
  return to_enum(:each_domain) unless block_given?
  Pathname.glob(Pathname.new(Swot.domains_path).join('**/*.txt')) do |path|
    yield(Swot.from_path(path))
  end
end