Class: TurboTest::Event

Inherits:
Object
  • Object
show all
Includes:
Observable
Defined in:
lib/turbo_test_events/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil) ⇒ Event

Returns a new instance of Event.



12
13
14
15
# File 'lib/turbo_test_events/event.rb', line 12

def initialize(name = nil)
  @name = name
  @observer_peers = Concurrent::Map.new
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/turbo_test_events/event.rb', line 10

def name
  @name
end

Instance Method Details

#publish(*arg) ⇒ Object



17
18
19
20
# File 'lib/turbo_test_events/event.rb', line 17

def publish(*arg)
  changed
  notify_observers(*arg)
end