Class: OpenCongressApi::Type::Bill
- Inherits:
-
Object
- Object
- OpenCongressApi::Type::Bill
- Defined in:
- lib/opencongress_api/type/bill.rb
Instance Attribute Summary collapse
-
#bill ⇒ Object
Returns the value of attribute bill.
Instance Method Summary collapse
-
#initialize(bill = {}) ⇒ Bill
constructor
A new instance of Bill.
- #method_missing(id, *args) ⇒ Object
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
#bill ⇒ Object
Returns the value of attribute bill.
4 5 6 |
# File 'lib/opencongress_api/type/bill.rb', line 4 def bill @bill end |