Class: Resto::Translator::ResponseFactory
- Defined in:
- lib/resto/translator/response_factory.rb
Instance Method Summary collapse
Methods inherited from Factory
Constructor Details
This class inherits a constructor from Resto::Translator::Factory
Instance Method Details
#call(klass, hash) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/resto/translator/response_factory.rb', line 8 def call(klass, hash) hash ||= {} raise ArgumentError unless hash.is_a?(Hash) klass.new(traverse(hash, 0)) end |