Class: Moneta::Api::ResponseFactory
- Inherits:
-
Object
- Object
- Moneta::Api::ResponseFactory
- Defined in:
- lib/moneta/api/response_factory.rb
Class Method Summary collapse
Class Method Details
.build(response) ⇒ Moneta::Api::Responses::*
7 8 9 10 11 12 13 |
# File 'lib/moneta/api/response_factory.rb', line 7 def build(response) klass = response.keys.first data = response.values.first prepare_data!(data) Object.const_get("Moneta::Api::Responses::#{ klass.to_s }").build(data) end |