Class: Dry::Mutations::Transactions::StepAdapters::Move
- Inherits:
-
Object
- Object
- Dry::Mutations::Transactions::StepAdapters::Move
show all
- Defined in:
- lib/dry/mutations/transactions/step_adapters.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.adapters ⇒ Object
15
16
17
|
# File 'lib/dry/mutations/transactions/step_adapters.rb', line 15
def self.adapters
@adapters ||= Utils.Hash
end
|
.inherited(sub) ⇒ Object
9
10
11
12
13
|
# File 'lib/dry/mutations/transactions/step_adapters.rb', line 9
def self.inherited(sub)
name = Utils.Snake(sub, short: true, symbolize: true)
StepAdapters.register name, sub.new
adapters[name] = sub
end
|
Instance Method Details
#call(step, *args, input) ⇒ Object
19
20
21
|
# File 'lib/dry/mutations/transactions/step_adapters.rb', line 19
def call(step, *args, input)
step.operation.(input, *args)
end
|