module BusinessPipeline::Hooks::ClassMethods
Public Instance Methods
add_hooks(*new_hooks, type: __callee__, &block)
click to toggle source
# File lib/business_pipeline/hooks.rb, line 12 def add_hooks(*new_hooks, type: __callee__, &block) hooks[type] += [*new_hooks, block].compact.map do |hook| hook.respond_to?(:new) ? hook.new : hook end end
hooks()
click to toggle source
# File lib/business_pipeline/hooks.rb, line 21 def hooks @hooks ||= { after: [], around: [], before: [] } end