Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/govtrack/helper.rb
Instance Method Summary collapse
Instance Method Details
#to_bill_type_number ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/govtrack/helper.rb', line 2 def to_bill_type_number #Fix for API not accepting bill_type as a string case self.to_s when 'house_resolution' 1 when 'senate_bill' 2 when 'house_bill' 3 when 'senate_resolution' 4 when 'house_concurrent_resolution' 5 when 'senate_concurrent_resolution' 6 when 'house_joint_resolution' 7 when 'senate_joint_resolution' 8 else self end end |
#to_current_status_number ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/govtrack/helper.rb', line 26 def to_current_status_number #Fix for API not accepting current_status as a string case self.to_s when 'introduced' 1 when 'referred' 2 when 'reported' 3 when 'pass_over_house' 4 when 'pass_over_senate' 5 when 'passed_simpleres' 6 else self end end |
#to_display_text ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/govtrack/helper.rb', line 46 def to_display_text case self when "+" "Aye" when "-" "No" when "0" "Not Voting" when "P" "Present" else self end end |