Class: EvilEvents::Core::Events::EventExtensions::Hookable::AbstractHook Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evil_events/core/events/event_extensions/hookable/abstract_hook.rb

Overview

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

Since:

  • 0.3.0

Direct Known Subclasses

AfterEmitHook, BeforeEmitHook, OnErrorHook

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(callable) ⇒ AbstractHook

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 a new instance of AbstractHook.

Parameters:

Since:

  • 0.3.0



15
16
17
# File 'lib/evil_events/core/events/event_extensions/hookable/abstract_hook.rb', line 15

def initialize(callable)
  @callable = callable
end

Instance Attribute Details

#callable#call (readonly)

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



10
11
12
# File 'lib/evil_events/core/events/event_extensions/hookable/abstract_hook.rb', line 10

def callable
  @callable
end

Instance Method Details

#call(source) ⇒ Object

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 void.

Parameters:

  • source (Object)

Returns:

  • void

Since:

  • 0.3.0



23
24
25
# File 'lib/evil_events/core/events/event_extensions/hookable/abstract_hook.rb', line 23

def call(source)
  callable.call(source)
end