Class: Hunter::EmailFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/hunter/email_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(first_name, last_name, key) ⇒ EmailFinder

Returns a new instance of EmailFinder.



9
10
11
12
13
# File 'lib/hunter/email_finder.rb', line 9

def initialize(first_name, last_name, key)
  @first_name = first_name
  @last_name = last_name
  @key = key
end

Instance Method Details

#perform(options) ⇒ Object



15
16
17
18
# File 'lib/hunter/email_finder.rb', line 15

def perform(options)
  response = call_api(options)
  Struct.new(*response.keys).new(*response.values) unless response.empty?
end