Class: VoteSmart::CandidateOffice

Inherits:
Common
  • Object
show all
Defined in:
lib/vote_smart/candidate_office.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressObject

Returns the value of attribute address.



5
6
7
# File 'lib/vote_smart/candidate_office.rb', line 5

def address
  @address
end

#notesObject

Returns the value of attribute notes.



5
6
7
# File 'lib/vote_smart/candidate_office.rb', line 5

def notes
  @notes
end

#phoneObject

Returns the value of attribute phone.



5
6
7
# File 'lib/vote_smart/candidate_office.rb', line 5

def phone
  @phone
end