lib/verifly/dependent_callbacks/storage.rb
# Declares callback groups with given names. This creates before_ after_ and around_
# signleton methods for each group given
# @see Service#add_callback
# @param groups [[Symbol]]
Declares callback groups with given names. This creates before_ after_ and around_
signleton methods for each group given
Declares callback groups with given names . This creates before_ after_ and around_ signleton methods for each group given
def callback_groups(*groups)
        groups.each do |group|
          dependent_callbacks_service.groups[group] 
          %i[before after around].each do |position|
            define_singleton_method("#{position}_#{group}") do |*args, &block|
              dependent_callbacks_service.add_callback(position, group, *args, &block)
            end
          end
        end
      end
def callback_groups ( * groups ) groups . each do | group | dependent_callbacks_service . groups [ group ] %i[ before after around ] . each do | position | define_singleton_method ( "#{position}_#{group}" ) do | * args , & block | dependent_callbacks_service . add_callback ( position , group , * args , & block ) end end end end
Declares callback groups with given names.
Declares callback groups with given names .
# Creates an empty group
groups
None
see
None