Class: Restspec::Stores::SchemaStoreDelegator
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Restspec::Stores::SchemaStoreDelegator
- Defined in:
- lib/restspec/stores/schema_store.rb
Overview
Provides methods for the SchemaStore object.
Instance Method Summary collapse
-
#get(schema_name) ⇒ Restspec::Schema::Schema?
Get the schema.
-
#store(schema) ⇒ Restspec::Schema::Schema
Stores a schema.
Instance Method Details
#get(schema_name) ⇒ Restspec::Schema::Schema?
Get the schema. It's just an alias for the Hash#[] method
19 20 21 |
# File 'lib/restspec/stores/schema_store.rb', line 19 def get(schema_name) self[schema_name] end |
#store(schema) ⇒ Restspec::Schema::Schema
Stores a schema. It uses the name of the schema as the hash key.
11 12 13 |
# File 'lib/restspec/stores/schema_store.rb', line 11 def store(schema) self[schema.name] = schema end |