Class: Dry::Mutations::Transactions::StepAdapters::Move

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/mutations/transactions/step_adapters.rb

Overview

:nodoc:

Direct Known Subclasses

Mutate, Tranquilo, Transform, Validate

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.adaptersObject



15
16
17
# File 'lib/dry/mutations/transactions/step_adapters.rb', line 15

def self.adapters
  @adapters ||= Utils.Hash
end

.inherited(sub) ⇒ Object

:nodoc:



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