Class: Lexicon::Common::Schema::ValidatorFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/lexicon/common/schema/validator_factory.rb

Instance Method Summary collapse

Constructor Details

#initialize(schema_path) ⇒ ValidatorFactory

Returns a new instance of ValidatorFactory.

Parameters:

  • schema_path (Pathname)


8
9
10
# File 'lib/lexicon/common/schema/validator_factory.rb', line 8

def initialize(schema_path)
  @schema_path = schema_path
end

Instance Method Details

#buildJSONSchemer::Schema::Base

Returns:

  • (JSONSchemer::Schema::Base)


13
14
15
# File 'lib/lexicon/common/schema/validator_factory.rb', line 13

def build
  JSONSchemer.schema(schema_path)
end