Class: Restspec::Schema::DSL
- Inherits:
-
Object
- Object
- Restspec::Schema::DSL
- Defined in:
- lib/restspec/schema/dsl.rb
Instance Attribute Summary collapse
-
#schemas ⇒ Object
readonly
Returns the value of attribute schemas.
Instance Method Summary collapse
Instance Attribute Details
#schemas ⇒ Object (readonly)
Returns the value of attribute schemas.
4 5 6 |
# File 'lib/restspec/schema/dsl.rb', line 4 def schemas @schemas end |
Instance Method Details
#schema(name, &definition) ⇒ Object
6 7 8 9 10 |
# File 'lib/restspec/schema/dsl.rb', line 6 def schema(name, &definition) dsl = SingleSchemaDSL.new(name) dsl.instance_eval(&definition) Restspec::SchemaStore.store(dsl.schema) end |