Module: Ray::DSL::EventRaiser

Included in:
Helper
Defined in:
lib/ray/dsl/event_raiser.rb

Overview

The module charged to raise your events, asking to an event runner to send this event to the objects which registered to it.

Instance Method Summary collapse

Instance Method Details

#raise_event(type, *args) ⇒ Object

Raises a new event, with the given type and arguments.

Raises:



7
8
9
10
# File 'lib/ray/dsl/event_raiser.rb', line 7

def raise_event(type, *args)
  raise NoRunnerError, self unless raiser_runner
  raiser_runner.add_event(type, args)
end

#raiser_runnerRay::DSL::EventRunner

Returns Event runner used to raise events.

Returns:



13
14
15
# File 'lib/ray/dsl/event_raiser.rb', line 13

def raiser_runner
  @__raiser_runner
end

#raiser_runner=(arg) ⇒ Object

Sets the event runner used to raise events.

Parameters:



19
20
21
# File 'lib/ray/dsl/event_raiser.rb', line 19

def raiser_runner=(arg)
  @__raiser_runner = arg
end