22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/trailblazer/operation/callback.rb', line 22
def callback(name=:default, constant=nil, &block)
heritage.record(:callback, name, constant, &block)
extended = self["callback.#{name}.class"] && self["callback.#{name}.class"]
path, group_class = Trailblazer::DSL::Build.new.({ prefix: :callback, class: Disposable::Callback::Group, container: self }, name, constant, block) { |extended| extended[:group] }
self[path] = { group: group_class, context: constant ? nil : :operation }
end
|