Class: EmailHunter::Search
- Inherits:
-
Object
- Object
- EmailHunter::Search
- Defined in:
- lib/email_hunter/search.rb
Instance Attribute Summary collapse
-
#emails ⇒ Object
readonly
Returns the value of attribute emails.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#webmail ⇒ Object
readonly
Returns the value of attribute webmail.
Instance Method Summary collapse
- #hunt ⇒ Object
-
#initialize(domain, key, params = {}) ⇒ Search
constructor
A new instance of Search.
Constructor Details
#initialize(domain, key, params = {}) ⇒ Search
Returns a new instance of Search.
10 11 12 13 14 |
# File 'lib/email_hunter/search.rb', line 10 def initialize(domain, key, params = {}) @domain = domain @key = key @params = params end |
Instance Attribute Details
#emails ⇒ Object (readonly)
Returns the value of attribute emails.
8 9 10 |
# File 'lib/email_hunter/search.rb', line 8 def emails @emails end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
8 9 10 |
# File 'lib/email_hunter/search.rb', line 8 def offset @offset end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
8 9 10 |
# File 'lib/email_hunter/search.rb', line 8 def results @results end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/email_hunter/search.rb', line 8 def status @status end |
#webmail ⇒ Object (readonly)
Returns the value of attribute webmail.
8 9 10 |
# File 'lib/email_hunter/search.rb', line 8 def webmail @webmail end |
Instance Method Details
#hunt ⇒ Object
16 17 18 19 |
# File 'lib/email_hunter/search.rb', line 16 def hunt response = apiresponse Struct.new(*response.keys).new(*response.values) unless response.empty? end |