Sha256: d81dad775e9c665f103359597c8fd2c27cb58fbae251eb9d1ec50e4da2366356
Contents?: true
Size: 469 Bytes
Versions: 39
Compression:
Stored size: 469 Bytes
Contents
module DispatchRider module Callbacks class Access attr_reader :callbacks def initialize(callbacks) @callbacks = callbacks end def invoke(event, *args, &block) action_proc = block callbacks.for(event).reverse.each do |filter_block| current_action = action_proc action_proc = proc { filter_block.call(current_action, *args) } end action_proc.call end end end end
Version data entries
39 entries across 39 versions & 1 rubygems