Class: OpenCongressApi::Type::Bill

Inherits:
Object
  • Object
show all
Defined in:
lib/opencongress_api/type/bill.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bill = {}) ⇒ Bill

Returns a new instance of Bill.



6
7
8
# File 'lib/opencongress_api/type/bill.rb', line 6

def initialize(bill = {})
  self.bill = bill
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(id, *args) ⇒ Object



10
11
12
# File 'lib/opencongress_api/type/bill.rb', line 10

def method_missing(id, *args)
  return self.bill[id.id2name]
end

Instance Attribute Details

#billObject

Returns the value of attribute bill.



4
5
6
# File 'lib/opencongress_api/type/bill.rb', line 4

def bill
  @bill
end