Module: Jsonschema::Matchers
- Defined in:
- lib/jsonschema/matchers.rb,
lib/jsonschema/matchers/version.rb,
lib/jsonschema/matchers/metadater.rb,
lib/jsonschema/matchers/configuration.rb,
lib/jsonschema/matchers/match_jsonschema.rb
Overview
Defined Under Namespace
Classes: Configuration, Error, MatchJsonschema, Metadater
Constant Summary
collapse
- VERSION =
'0.1.5'
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
24
25
26
|
# File 'lib/jsonschema/matchers.rb', line 24
def self.configuration
@configuration ||= Configuration.new
end
|
Class Method Details
28
29
30
|
# File 'lib/jsonschema/matchers.rb', line 28
def self.configure
yield(configuration)
end
|
Instance Method Details
#match_jsonschema(name: nil) ⇒ Object
32
33
34
35
36
37
38
|
# File 'lib/jsonschema/matchers.rb', line 32
def match_jsonschema(name: nil)
schema_name = name || inspect.scan(/\"(.*?)\"/).join
raise Error, NO_SCHEMA_NAME_ERROR unless schema_name
MatchJsonschema.new(self.class.metadata, schema_name)
end
|