def my_step(value_1: , **rest)
value_1_transformed = do_something(value_1)
Right(value_1: value_1_transformed, **rest)
end
txn = define_transaction do
custom_step_adapter 'step_1', using: :value_1
custom_step_adapter 'step_2', using: :value_2
map 'step_3'
end
txn.call(value_1: 1, value_2: 2)
def my_step(value_1)
value_1 + 1
end
def my_step(value_2)
value_2 + 1
end
def step_3(context)
context # { value_1: 2, value_2: 3 }
end
options
which is basically a hash, and passed from step to step (per default) http://trailblazer.to/gems/operation/2.0/#state-and-result
rake
runs two rspec suites
dry-struct
. on the first attribute
call.equalizer.instance_variable_get('@keys').concat(new_schema.keys)
NoMethodError: undefined method `concat' for nil:NilClass
/Users/kukunin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/dry-struct-fbe71e6445a8/lib/dry/struct/class_interface.rb:78:in `attributes'
/Users/kukunin/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/dry-struct-fbe71e6445a8/lib/dry/struct/class_interface.rb:50:in `attribute'
/Users/kukunin/Sites/matic-www/gems/shift-domain/lib/shift/domain/attachment.rb:8:in `block in <module:Domain>'