Class: Easy::Api::RawAttributesResult
- Inherits:
-
Object
- Object
- Easy::Api::RawAttributesResult
- Defined in:
- lib/easy/api/result.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize ⇒ RawAttributesResult
constructor
A new instance of RawAttributesResult.
- #method_missing(symbol, *args) ⇒ Object
Constructor Details
#initialize ⇒ RawAttributesResult
107 108 109 |
# File 'lib/easy/api/result.rb', line 107 def initialize @attributes = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
113 114 115 116 117 118 119 120 |
# File 'lib/easy/api/result.rb', line 113 def method_missing(symbol, *args) if symbol =~ /.+=/ attr_name = symbol.to_s[0..-2] @attributes[attr_name] = args.first else super end end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
111 112 113 |
# File 'lib/easy/api/result.rb', line 111 def attributes @attributes end |