Module: Ask::Schema::Helpers
- Defined in:
- lib/ask/schema/helpers.rb
Overview
Convenience helpers for creating schemas in a top-level context.
Instance Method Summary collapse
-
#schema(name = nil, description: nil, &block) ⇒ Schema
Create a new schema instance using a DSL block.
Instance Method Details
#schema(name = nil, description: nil, &block) ⇒ Schema
Create a new schema instance using a DSL block.
13 14 15 16 |
# File 'lib/ask/schema/helpers.rb', line 13 def schema(name = nil, description: nil, &block) schema_class = Ask::Schema.create(&block) schema_class.new(name, description: description) end |