Class: EmailHunter::Exist

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email, key) ⇒ Exist

Returns a new instance of Exist.



10
11
12
13
# File 'lib/email_hunter/exist.rb', line 10

def initialize(email, key)
  @email = email
  @key = key
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



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

def email
  @email
end

#existObject (readonly)

Returns the value of attribute exist.



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

def exist
  @exist
end

#sourcesObject (readonly)

Returns the value of attribute sources.



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

def sources
  @sources
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Instance Method Details

#huntObject



15
16
17
18
# File 'lib/email_hunter/exist.rb', line 15

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