Method: JSON::SchemaBuilder::Array#items

Defined in:
lib/json/schema_builder/array.rb

#items(*args, &block) ⇒ Object



12
13
14
15
16
17
# File 'lib/json/schema_builder/array.rb', line 12

def items(*args, &block)
  opts = args.extract_options!
  schema[:items] = args.first
  schema[:items] ||= items_entity(opts, &block).as_json
  parent.reinitialize if parent
end