Class: Hipbot::Plugins::Rapportive::Rapportive

Inherits:
Object
  • Object
show all
Defined in:
lib/hipbot-plugins/rapportive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(firstname, lastname, domain) ⇒ Rapportive

Returns a new instance of Rapportive.



17
18
19
20
21
# File 'lib/hipbot-plugins/rapportive.rb', line 17

def initialize(firstname, lastname, domain)
  self.firstname = firstname
  self.lastname = lastname
  self.domain = domain
end

Instance Attribute Details

#domainObject

Returns the value of attribute domain.



15
16
17
# File 'lib/hipbot-plugins/rapportive.rb', line 15

def domain
  @domain
end

#firstnameObject

Returns the value of attribute firstname.



15
16
17
# File 'lib/hipbot-plugins/rapportive.rb', line 15

def firstname
  @firstname
end

#lastnameObject

Returns the value of attribute lastname.



15
16
17
# File 'lib/hipbot-plugins/rapportive.rb', line 15

def lastname
  @lastname
end

Instance Method Details

#to_sObject



23
24
25
26
# File 'lib/hipbot-plugins/rapportive.rb', line 23

def to_s
  return "Sorry, I could not find email address" if profile.nil?
  "Found it! Email #{profile['contact']['email']} is valid."
end