Class: Meta::JsonSchema::RefSchemaBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/meta/json_schema/builders/ref_schema_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ RefSchemaBuilder

Returns a new instance of RefSchemaBuilder.



8
9
10
11
12
# File 'lib/meta/json_schema/builders/ref_schema_builder.rb', line 8

def initialize(options)
  options = options.dup
  @ref_schema_builder = options.delete(:ref)
  @base_options = options
end

Instance Method Details

#to_schemaObject



14
15
16
# File 'lib/meta/json_schema/builders/ref_schema_builder.rb', line 14

def to_schema
  RefSchema.new(@ref_schema_builder.to_schema, @base_options)
end