Class: EmailAssessor::DirectoryDomainList
- Inherits:
-
Object
- Object
- EmailAssessor::DirectoryDomainList
- Defined in:
- lib/email_assessor/directory_domain_list.rb
Instance Attribute Summary collapse
-
#pathname ⇒ Object
readonly
Returns the value of attribute pathname.
Instance Method Summary collapse
Instance Attribute Details
#pathname ⇒ Object (readonly)
Returns the value of attribute pathname.
5 6 7 |
# File 'lib/email_assessor/directory_domain_list.rb', line 5 def pathname @pathname end |
Instance Method Details
#include_any?(domain_token_set) ⇒ Boolean
7 8 9 10 11 12 13 14 15 |
# File 'lib/email_assessor/directory_domain_list.rb', line 7 def include_any?(domain_token_set) chars = if @prioritization.present? @prioritization else domain_token_set.indexes end chars.any? { |char| domain_list(char).include_any?(domain_token_set) } end |
#sample ⇒ Object
17 18 19 |
# File 'lib/email_assessor/directory_domain_list.rb', line 17 def sample File.open(Dir.glob(File.join(@pathname, "?.txt")).first, &:readline).chomp end |