Class: SimpleSchema::SchemaItems

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_schema/schema_items.rb

Class Method Summary collapse

Class Method Details

.build(schema, options) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/simple_schema/schema_items.rb', line 3

def self.build(schema, options)
  if schema[:items]
    schema[:type] = :array
    schema[:items] = Schema.new(schema[:items], options).schema
  end
  schema
end