Class: JsonSchemaRails::Loaders::HyperSchema
- Defined in:
- lib/json_schema_rails/loaders/hyper_schema.rb
Defined Under Namespace
Classes: SchemaIndex
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ HyperSchema
constructor
A new instance of HyperSchema.
- #load_schema!(schema_path) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(path, options = {}) ⇒ HyperSchema
Returns a new instance of HyperSchema.
6 7 8 9 |
# File 'lib/json_schema_rails/loaders/hyper_schema.rb', line 6 def initialize(path, = {}) @path = path super() end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/json_schema_rails/loaders/hyper_schema.rb', line 4 def path @path end |
Instance Method Details
#load_schema!(schema_path) ⇒ Object
11 12 13 14 15 |
# File 'lib/json_schema_rails/loaders/hyper_schema.rb', line 11 def load_schema!(schema_path) with_cache(schema_path) do schema_index.find(schema_path) or raise SchemaNotFound end end |