Class: GovKit::OpenCongress::RollCallComparison

Inherits:
OpenCongressObject show all
Defined in:
lib/gov_kit/open_congress/roll_call_comparison.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OpenCongressObject

construct_url, hash2get, make_call, parse_supporting_results

Constructor Details

#initialize(params) ⇒ RollCallComparison

Returns a new instance of RollCallComparison.



7
8
9
10
11
12
13
# File 'lib/gov_kit/open_congress/roll_call_comparison.rb', line 7

def initialize(params)
  super RollCallComparison, params

  set_people
  set_roll_call
      
end

Instance Attribute Details

#person1Object

Returns the value of attribute person1.



5
6
7
# File 'lib/gov_kit/open_congress/roll_call_comparison.rb', line 5

def person1
  @person1
end

#person2Object

Returns the value of attribute person2.



5
6
7
# File 'lib/gov_kit/open_congress/roll_call_comparison.rb', line 5

def person2
  @person2
end

#roll_callObject

Returns the value of attribute roll_call.



5
6
7
# File 'lib/gov_kit/open_congress/roll_call_comparison.rb', line 5

def roll_call
  @roll_call
end

Instance Method Details

#set_peopleObject



15
16
17
18
# File 'lib/gov_kit/open_congress/roll_call_comparison.rb', line 15

def set_people
  self.person1 = self.person1["stong"]
  self.person2 = self.person2["stong"]
end

#set_roll_callObject



20
21
22
# File 'lib/gov_kit/open_congress/roll_call_comparison.rb', line 20

def set_roll_call
  self.roll_call = RollCall.new(self.roll_call)
end