Class: Etna::Clients::Magma::RetrievalResponse
- Inherits:
-
Object
- Object
- Etna::Clients::Magma::RetrievalResponse
- Defined in:
- lib/etna/clients/magma/models.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(raw = {}) ⇒ RetrievalResponse
constructor
A new instance of RetrievalResponse.
- #models ⇒ Object
- #update(response) ⇒ Object
Constructor Details
#initialize(raw = {}) ⇒ RetrievalResponse
Returns a new instance of RetrievalResponse.
163 164 165 |
# File 'lib/etna/clients/magma/models.rb', line 163 def initialize(raw = {}) @raw = raw end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
161 162 163 |
# File 'lib/etna/clients/magma/models.rb', line 161 def raw @raw end |
Instance Method Details
#models ⇒ Object
167 168 169 |
# File 'lib/etna/clients/magma/models.rb', line 167 def models Models.new(raw['models']) end |
#update(response) ⇒ Object
171 172 173 174 175 |
# File 'lib/etna/clients/magma/models.rb', line 171 def update(response) response.models.each do |model_name, model| models.update( model_name, model ) end end |