Module: Trailblazer::Operation::Callback
- Defined in:
- lib/trailblazer/operation/callback.rb
Defined Under Namespace
Modules: DSL
Class Method Summary collapse
Class Method Details
.call(name = :default, operation, options) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/trailblazer/operation/callback.rb', line 11 def self.call(name=:default, operation, ) config = ["callback.#{name}.class"] || raise #.fetch(name) # TODO: test exception group = config[:group].new(["contract.default"]) [:context] ||= (config[:context] == :operation ? operation : group) group.() ["result.callback.#{name}"] = group end |