Class: MyRepresentatives::WA::WebUpper

Inherits:
Object
  • Object
show all
Includes:
Abbreviatable, Guessable
Defined in:
lib/my_representatives/wa/web_upper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Guessable

#guess_first, #guess_gender, #guess_last, #guess_preferred, #guess_title

Methods included from Abbreviatable

#state_abbreviation

Constructor Details

#initializeWebUpper

Returns a new instance of WebUpper.



9
10
11
12
13
14
15
16
17
18
# File 'lib/my_representatives/wa/web_upper.rb', line 9

def initialize
  @logger = Logger.new(STDOUT)
  @urls = WebIndex.new.upper_urls
  @people = []

  @urls.each do |url|
    document = WebShow.new(url)
    create_person_from_document(document)
  end
end

Instance Attribute Details

#peopleObject

Returns the value of attribute people.



7
8
9
# File 'lib/my_representatives/wa/web_upper.rb', line 7

def people
  @people
end

#urlsObject

Returns the value of attribute urls.



7
8
9
# File 'lib/my_representatives/wa/web_upper.rb', line 7

def urls
  @urls
end