Class: ApiBlocks::Interactor
- Inherits:
-
Object
- Object
- ApiBlocks::Interactor
- Includes:
- Dry::Transaction
- Defined in:
- lib/api_blocks/interactor.rb
Class Attribute Summary collapse
-
.input_schema ⇒ Object
Returns the value of attribute input_schema.
Class Method Summary collapse
-
.call(*args) ⇒ Object
Call the interactor with its arguments.
-
.input(&block) ⇒ Object
Define a contract for the input of this interactor using ‘dry-validation`.
-
.with_step_args(*args) ⇒ Object
Call the interactor with additional step arguments.
Class Attribute Details
.input_schema ⇒ Object
Returns the value of attribute input_schema.
44 45 46 |
# File 'lib/api_blocks/interactor.rb', line 44 def input_schema @input_schema end |
Class Method Details
.call(*args) ⇒ Object
Call the interactor with its arguments.
76 77 78 |
# File 'lib/api_blocks/interactor.rb', line 76 def self.call(*args) new.call(*args) end |
.input(&block) ⇒ Object
Define a contract for the input of this interactor using ‘dry-validation`
62 63 64 |
# File 'lib/api_blocks/interactor.rb', line 62 def self.input(&block) @input_schema = Class.new(Dry::Validation::Contract, &block).new end |
.with_step_args(*args) ⇒ Object
Call the interactor with additional step arguments.
86 87 88 |
# File 'lib/api_blocks/interactor.rb', line 86 def self.with_step_args(*args) new.with_step_args(*args) end |