Class: Vatlayer::Response::Data
- Inherits:
-
Object
- Object
- Vatlayer::Response::Data
- Defined in:
- lib/vatlayer/response/data.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(attributes) ⇒ Data
Returns a new instance of Data.
8 9 10 11 12 13 |
# File 'lib/vatlayer/response/data.rb', line 8 def initialize(attributes) attributes.each do |(key, value)| self.class.class_eval { attr_accessor :"#{key}" } public_send("#{key}=", key == 'error' ? Vatlayer::Response::Error.new(value) : value) end end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
6 7 8 |
# File 'lib/vatlayer/response/data.rb', line 6 def error @error end |