Modules: ClassMethods
7 8 9 10 11 12 13 14
# 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).tap do reinitialize if is_a?(Entity) end end