Module: Core::Endpoint::BasicHandler::Actions::Factory

Defined in:
app/api/core/endpoint/basic_handler/actions/factory.rb

Defined Under Namespace

Classes: Nested

Instance Method Summary collapse

Instance Method Details

#nested(json, &block) ⇒ Object


25
26
27
28
# File 'app/api/core/endpoint/basic_handler/actions/factory.rb', line 25

def nested(json, &block)
  class_handler = Class.new(Nested).tap { |handler| self.class.const_set(json.to_s.camelize, handler) }
  register_handler(json, class_handler.new(json, &block))
end