Module: EvilEvents::Core::Events::EventExtensions::Hookable::ClassMethods Private

Defined in:
lib/evil_events/core/events/event_extensions/hookable.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0

Instance Method Summary collapse

Instance Method Details

#__after_emit_hooks__Concurrent::Array<AfterHook>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Concurrent::Array<AfterHook>)

Since:

  • 0.3.0



80
81
82
# File 'lib/evil_events/core/events/event_extensions/hookable.rb', line 80

def __after_emit_hooks__
  @__after_emit_hooks__ ||= Concurrent::Array.new
end

#__before_emit_hooks__Concurrent::Array<BeforeHook>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Concurrent::Array<BeforeHook>)

Since:

  • 0.3.0



72
73
74
# File 'lib/evil_events/core/events/event_extensions/hookable.rb', line 72

def __before_emit_hooks__
  @__before_emit_hooks__ ||= Concurrent::Array.new
end

#__on_error_hooks__Concurrent::Array<OnErrorHook>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

Since:

  • 0.3.0



88
89
90
# File 'lib/evil_events/core/events/event_extensions/hookable.rb', line 88

def __on_error_hooks__
  @__on_error_hooks__ ||= Concurrent::Array.new
end

#after_emit(hook) ⇒ Object

Parameters:

Since:

  • 0.3.0



56
57
58
# File 'lib/evil_events/core/events/event_extensions/hookable.rb', line 56

def after_emit(hook)
  __after_emit_hooks__ << AfterEmitHook.new(hook)
end

#before_emit(hook) ⇒ Object

Parameters:

Since:

  • 0.3.0



48
49
50
# File 'lib/evil_events/core/events/event_extensions/hookable.rb', line 48

def before_emit(hook)
  __before_emit_hooks__ << BeforeEmitHook.new(hook)
end

#on_error(hook) ⇒ Object

Parameters:

Since:

  • 0.3.0



64
65
66
# File 'lib/evil_events/core/events/event_extensions/hookable.rb', line 64

def on_error(hook)
  __on_error_hooks__ << OnErrorHook.new(hook)
end