Class: EmailAssessor::FileDomainList
- Inherits:
-
Object
- Object
- EmailAssessor::FileDomainList
- Defined in:
- lib/email_assessor/file_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/file_domain_list.rb', line 5 def pathname @pathname end |
Instance Method Details
#include_any?(domain_token_set) ⇒ Boolean
7 8 9 10 11 |
# File 'lib/email_assessor/file_domain_list.rb', line 7 def include_any?(domain_token_set) File.foreach(@pathname, chomp: true).any? do |domain| domain_token_set.include?(domain) end end |
#sample ⇒ Object
13 14 15 |
# File 'lib/email_assessor/file_domain_list.rb', line 13 def sample File.open(@pathname, &:readline).chomp end |