Class: PagerDuty::Person

Inherits:
Object
  • Object
show all
Defined in:
lib/pagerduty_tools/pagerduty.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#emailObject

Returns the value of attribute email.



240
241
242
# File 'lib/pagerduty_tools/pagerduty.rb', line 240

def email
  @email
end

Instance Method Details

#parse(page_body) ⇒ Object



242
243
244
245
246
# File 'lib/pagerduty_tools/pagerduty.rb', line 242

def parse page_body
  user = Nokogiri::HTML(page_body).css("div#user_profile").first
  div = user.css("div").first
  @email = div.css("td > a").text
end