Module: JSON::SchemaBuilder::DSL

Extended by:
ActiveSupport::Concern
Included in:
JSON::SchemaBuilder, Entity
Defined in:
lib/json/schema_builder/dsl.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#entity(*args, &block) ⇒ Object



7
8
9
10
11
12
# File 'lib/json/schema_builder/dsl.rb', line 7

def entity(*args, &block)
  opts = args.extract_options!
  klass, name = klass_and_name_from args
  set_context_for opts
  klass.new name, opts, &block
end