Class: Lyra::EventRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/lyra/event.rb

Class Method Summary collapse

Class Method Details

.all ⇒ Object



62
63
64
# File 'lib/lyra/event.rb', line 62

def all
  @events
end

.find_by_name(name) ⇒ Object



66
67
68
# File 'lib/lyra/event.rb', line 66

def find_by_name(name)
  @events.find { |e| e.name == name }
end

.register(event_class) ⇒ Object



58
59
60
# File 'lib/lyra/event.rb', line 58

def register(event_class)
  @events << event_class unless @events.include?(event_class)
end