Sha256: 1113b9c5edce12ec96ef96ea00a0849b73f36d52d33eb85f4b5fa558525d100d

Contents?: true

Size: 535 Bytes

Versions: 3

Compression:

Stored size: 535 Bytes

Contents

module Ray
  module DSL
    # The module charged to raise your events, asking to an event runner to send
    # this event to the objects who said they were interested in it.
    module EventRaiser
      # Raises a new event, with the given type and arguments.
      def raise_event(type, *args)
        return unless raiser_runner
        raiser_runner.add_event(type, args)
      end

      def raiser_runner
        @__raiser_runner
      end

      def raiser_runner=(arg)
        @__raiser_runner = arg
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ray-0.1.0.pre1 lib/ray/dsl/event_raiser.rb
ray-0.0.1 lib/ray/dsl/event_raiser.rb
ray-0.0.0.pre2 lib/ray/dsl/event_raiser.rb