Sha256: 140fbc2241ae02d40596d30022a52d895f39395fde32e1eefaf9f197673e27cd
Contents?: true
Size: 1001 Bytes
Versions: 5
Compression:
Stored size: 1001 Bytes
Contents
# frozen_string_literal: true module IIFinder module Callbacks extend ActiveSupport::Concern include ActiveSupport::Callbacks included do define_callbacks :all define_callbacks :call end def call_all run_callbacks :all do super end end def call run_callbacks :call do super end end class_methods do def before_all(*args, &block) set_callback(:all, :before, *args, &block) end def after_all(*args, &block) set_callback(:all, :after, *args, &block) end def around_all(*args, &block) set_callback(:all, :around, *args, &block) end def before_call(*args, &block) set_callback(:call, :before, *args, &block) end def after_call(*args, &block) set_callback(:call, :after, *args, &block) end def around_call(*args, &block) set_callback(:call, :around, *args, &block) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems