class Governator::Panel

Public Instance Methods

bio_page() click to toggle source
# File lib/governator/panel.rb, line 11
def bio_page
  @_bio_page ||= raw.css('.governors-state a').first['href']
end
governor_name() click to toggle source
# File lib/governator/panel.rb, line 15
def governor_name
  @_governor_name ||= raw.css('.governors-state a')
                         .first
                         .text
                         .sub('Governor ', '')
                         .gsub('  ', ' ')
end
image() click to toggle source
# File lib/governator/panel.rb, line 7
def image
  @_image ||= raw.css('.governors-img img').first['src']
end
state() click to toggle source
# File lib/governator/panel.rb, line 23
def state
  state = raw.css('.governors-state h3').first.text
  case state
  when 'Northern Mariana Islands' then 'Commonwealth of the ' + state
  when 'Virgin Islands' then 'United States ' + state
  else state
  end
end