module EvilEvents::Core::Events::EventExtensions::Hookable

@api private @since 0.3.0

Public Class Methods

included(base_class) click to toggle source

@param base_class [Class]

@since 0.3.0

# File lib/evil_events/core/events/event_extensions/hookable.rb, line 11
def included(base_class)
  base_class.extend(ClassMethods)
end

Public Instance Methods

__call_after_hooks__() click to toggle source

@api private @since 0.3.0

# File lib/evil_events/core/events/event_extensions/hookable.rb, line 36
def __call_after_hooks__
  self.class.__after_emit_hooks__.each do |hook|
    hook.call(self)
  end
end
__call_before_hooks__() click to toggle source

@api private @since 0.3.0

# File lib/evil_events/core/events/event_extensions/hookable.rb, line 28
def __call_before_hooks__
  self.class.__before_emit_hooks__.each do |hook|
    hook.call(self)
  end
end
__call_on_error_hooks__(error) click to toggle source

@param error [StandardError]

@api private @since 0.3.0

# File lib/evil_events/core/events/event_extensions/hookable.rb, line 20
def __call_on_error_hooks__(error)
  self.class.__on_error_hooks__.each do |hook|
    hook.call(self, error)
  end
end