Class: EmailHunter::Generate

Inherits:
Object
  • Object
show all
Defined in:
lib/email_hunter/generate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain, first_name, last_name, key) ⇒ Generate

Returns a new instance of Generate.



10
11
12
13
14
15
# File 'lib/email_hunter/generate.rb', line 10

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

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



8
9
10
# File 'lib/email_hunter/generate.rb', line 8

def email
  @email
end

#scoreObject (readonly)

Returns the value of attribute score.



8
9
10
# File 'lib/email_hunter/generate.rb', line 8

def score
  @score
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/email_hunter/generate.rb', line 8

def status
  @status
end

Instance Method Details

#huntObject



17
18
19
20
# File 'lib/email_hunter/generate.rb', line 17

def hunt
  response = apiresponse
  Struct.new(*response.keys).new(*response.values) unless response.empty?
end