Class: Evil::Client::DSL::Operation
- Inherits:
-
Object
- Object
- Evil::Client::DSL::Operation
- Defined in:
- lib/evil/client/dsl/operation.rb
Overview
Builds a schema for single operation
Instance Attribute Summary collapse
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
-
#finalize(settings) ⇒ Hash<Symbol, Object>
Builds a schema for a single operation.
Instance Attribute Details
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
9 10 11 |
# File 'lib/evil/client/dsl/operation.rb', line 9 def schema @schema end |
Instance Method Details
#finalize(settings) ⇒ Hash<Symbol, Object>
Builds a schema for a single operation
17 18 19 20 21 22 23 24 |
# File 'lib/evil/client/dsl/operation.rb', line 17 def finalize(settings) @mutex.synchronize do @schema = @default.dup instance_exec(settings, &@block) if @block @schema[:middleware]&.finalize(settings) @schema end end |