Class: Bling::API::Record
- Inherits:
-
Object
- Object
- Bling::API::Record
- Defined in:
- lib/bling/api/record.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Hash
readonly
The original hash attributes passed on initialize.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Record
constructor
A new instance of Record.
Constructor Details
#initialize(hash) ⇒ Record
Returns a new instance of Record.
9 10 11 |
# File 'lib/bling/api/record.rb', line 9 def initialize(hash) @attrs = hash end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
15 16 17 18 19 20 21 |
# File 'lib/bling/api/record.rb', line 15 def method_missing(method, *args, &block) if attrs.has_key?(method) attrs[method] else super(method, args, block) end end |
Instance Attribute Details
#attrs ⇒ Hash (readonly)
Returns The original hash attributes passed on initialize.
6 7 8 |
# File 'lib/bling/api/record.rb', line 6 def attrs @attrs end |