Class: MyRepresentatives::NSW::WebIndex
- Inherits:
-
Object
- Object
- MyRepresentatives::NSW::WebIndex
- Defined in:
- lib/my_representatives/nsw/web_index.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
-
#index_url ⇒ Object
Returns the value of attribute index_url.
-
#lower_urls ⇒ Object
Returns the value of attribute lower_urls.
-
#upper_urls ⇒ Object
Returns the value of attribute upper_urls.
Instance Method Summary collapse
-
#initialize ⇒ WebIndex
constructor
A new instance of WebIndex.
Constructor Details
#initialize ⇒ WebIndex
Returns a new instance of WebIndex.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/my_representatives/nsw/web_index.rb', line 6 def initialize @logger = Logger.new(STDOUT) @index_url = nil @document = nil @lower_urls = [] @upper_urls = [] # Lower House @index_url = "https://www.parliament.nsw.gov.au/members/pages/all-members.aspx?house=LA" @document = find_representatives representative_urls_from_document( { lower_house: true } ) # Upper House @index_url = "https://www.parliament.nsw.gov.au/members/pages/all-members.aspx?house=LC" @document = find_representatives representative_urls_from_document( { lower_house: false } ) end |
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document.
4 5 6 |
# File 'lib/my_representatives/nsw/web_index.rb', line 4 def document @document end |
#index_url ⇒ Object
Returns the value of attribute index_url.
4 5 6 |
# File 'lib/my_representatives/nsw/web_index.rb', line 4 def index_url @index_url end |
#lower_urls ⇒ Object
Returns the value of attribute lower_urls.
4 5 6 |
# File 'lib/my_representatives/nsw/web_index.rb', line 4 def lower_urls @lower_urls end |
#upper_urls ⇒ Object
Returns the value of attribute upper_urls.
4 5 6 |
# File 'lib/my_representatives/nsw/web_index.rb', line 4 def upper_urls @upper_urls end |