Class: VoteSmart::Measure

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

Class Method Summary collapse

Methods inherited from Common

construct_url, get_json_data, hash2get, #initialize, parallelize!, request, response_child, session, set_attribute_map, #update_attributes

Constructor Details

This class inherits a constructor from VoteSmart::Common

Class Method Details

.get_measure(measure_id) ⇒ Object

Returns a ballot measure’s details



6
7
8
# File 'lib/vote_smart/measure.rb', line 6

def self.get_measure measure_id
  request("Measure.getMeasure", "measureId" => measure_id)
end

.get_measures_by_year_state(year, state_id) ⇒ Object

Returns a list of ballot measures that fit the criteria



11
12
13
# File 'lib/vote_smart/measure.rb', line 11

def self.get_measures_by_year_state year, state_id
  request("Measure.getMeasuresByYearState", "year" => year, "stateId" => state_id)
end