Class: Lurker::Json::Extensions

Inherits:
Schema
  • Object
show all
Defined in:
lib/lurker/json/schema/extensions.rb

Constant Summary collapse

EXTENSIONS =
'extensions'.freeze

Constants inherited from Schema

Schema::REQUEST_PARAMETERS, Schema::RESPONSE_CODES, Schema::RESPONSE_PARAMETERS

Instance Attribute Summary

Attributes inherited from Schema

#parent_property, #parent_schema, #root_schema, #uri

Instance Method Summary collapse

Methods inherited from Schema

#documentation, #documentation_uri, #method_missing, #reorder!, #replace!, #root?, #to_hash, #to_json, #to_yaml

Methods included from Concerns::Validatable

#to_validation_schema, #validate

Constructor Details

#initialize(schema, options = {}) ⇒ Extensions

Returns a new instance of Extensions.



6
7
8
9
10
# File 'lib/lurker/json/schema/extensions.rb', line 6

def initialize(schema, options = {})
  @parent_property = EXTENSIONS

  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Lurker::Json::Schema

Instance Method Details

#merge!(schema) ⇒ Object



12
13
14
15
16
# File 'lib/lurker/json/schema/extensions.rb', line 12

def merge!(schema)
  return unless Lurker.upgrade?

  @schema = @parser.parse_property(parent_property, schema)
end