Module: EvilEvents::Core::Events::ManagerFactory Private

Defined in:
lib/evil_events/core/events/manager_factory.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.1.0

Class Method Summary collapse

Class Method Details

.create(event_class) ⇒ EvilEvents::Core::Events::Manager

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.



13
14
15
16
17
18
19
# File 'lib/evil_events/core/events/manager_factory.rb', line 13

def create(event_class)
  unless event_class.is_a?(Class) && event_class < EvilEvents::Core::Events::AbstractEvent
    raise EvilEvents::IncorrectEventClassError
  end

  Manager.new(event_class)
end