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.
7 8 9 |
# File 'lib/evil/client/dsl/operation.rb', line 7 def schema @schema end |
Instance Method Details
#finalize(settings) ⇒ Hash<Symbol, Object>
Builds a schema for a single operation
15 16 17 18 19 20 21 22 |
# File 'lib/evil/client/dsl/operation.rb', line 15 def finalize(settings) @mutex.synchronize do @schema = @default.dup instance_exec(settings, &@block) if @block @schema[:middleware]&.finalize(settings) @schema end end |