Class: Restspec::Stores::SchemaStoreDelegator

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/restspec/stores/schema_store.rb

Overview

Provides methods for the SchemaStore object.

Instance Method Summary collapse

Instance Method Details

#get(schema_name) ⇒ Restspec::Schema::Schema?

Get the schema. It's just an alias for the Hash#[] method

Parameters:

  • schema_name

    the name of the schema.

Returns:



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.

Parameters:

Returns:



11
12
13
# File 'lib/restspec/stores/schema_store.rb', line 11

def store(schema)
  self[schema.name] = schema
end