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