Class: VoteSmart::CandidateOffice
- Defined in:
- lib/vote_smart/candidate_office.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#phone ⇒ Object
Returns the value of attribute phone.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ CandidateOffice
constructor
A new instance of CandidateOffice.
Methods inherited from Common
construct_url, get_json_data, hash2get, parallelize!, request, response_child, session, set_attribute_map, #update_attributes
Constructor Details
#initialize(attributes) ⇒ CandidateOffice
Returns a new instance of CandidateOffice.
7 8 9 10 11 |
# File 'lib/vote_smart/candidate_office.rb', line 7 def initialize attributes self.address = Address.new(attributes["address"] || {}) self.phone = Phone.new(attributes["phone"] || {}) self.notes = Notes.new(attributes["notes"] || {}) end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
5 6 7 |
# File 'lib/vote_smart/candidate_office.rb', line 5 def address @address end |
#notes ⇒ Object
Returns the value of attribute notes.
5 6 7 |
# File 'lib/vote_smart/candidate_office.rb', line 5 def notes @notes end |
#phone ⇒ Object
Returns the value of attribute phone.
5 6 7 |
# File 'lib/vote_smart/candidate_office.rb', line 5 def phone @phone end |