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) ⇒ Object



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

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