Sha256: c662e5b971d73e1f3241322d8a625b224e73f837753262fc6f7592d5f2adbf70
Contents?: true
Size: 1023 Bytes
Versions: 6
Compression:
Stored size: 1023 Bytes
Contents
module GovKit module OpenCongress class VotingComparison < OpenCongressObject attr_accessor :total_votes, :same_vote, :percentage, :person1, :person2, :shared_committees, :hot_votes, :other_votes def initialize(params) super VotingComparison, params set_people set_votes end def set_people self.person1 = Person.new(self.person1["person"]) self.person2 = Person.new(self.person2["person"]) end def set_votes these_hot_votes = [] hot_votes["vote"].each do |v| nv = RollCallComparison.new(v) these_hot_votes << nv end self.hot_votes = these_hot_votes these_other_votes = [] other_votes["vote"].each do |v| nv = RollCallComparison.new(v) these_other_votes << nv end self.other_votes = these_other_votes end end end end
Version data entries
6 entries across 6 versions & 2 rubygems