Sha256: c1d398d7d86571a40bd28f666af2f5eacca29d6b08b257546f1d1a92e8528149
Contents?: true
Size: 739 Bytes
Versions: 2
Compression:
Stored size: 739 Bytes
Contents
module NYTimes module Congress class RollCallVote < Base include AttributeTransformation ATTRIBUTE_MAP = { :date_for => [:date], :integer_for => [:session_number, :congress, :roll_call], :string_for => [:chamber, :bill_number, :question, :vote_type, :time, :result, :description], :positions_for => [:positions] } attr_reader *ATTRIBUTE_MAP.values.flatten def initialize(args={}) transformed_values = self.transform(args, ATTRIBUTE_MAP) transformed_values.each_pair do |attribute, value| instance_variable_set("@#{attribute}", value) end end def get_congress Congress.new(congress, chamber) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hoverbird-ny-times-congress-1.0.0 | lib/ny-times/congress/roll_call_vote.rb |
hoverbird-ny-times-congress-1.1.0 | lib/ny-times/congress/roll_call_vote.rb |