Class: Cased::Publishers::TestPublisher

Inherits:
Base
  • Object
show all
Defined in:
lib/cased/publishers/test_publisher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==

Constructor Details

#initializeTestPublisher

Returns a new instance of TestPublisher.



10
11
12
13
# File 'lib/cased/publishers/test_publisher.rb', line 10

def initialize
  super
  @events = []
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



8
9
10
# File 'lib/cased/publishers/test_publisher.rb', line 8

def events
  @events
end

Instance Method Details

#publish(event) ⇒ Object



15
16
17
# File 'lib/cased/publishers/test_publisher.rb', line 15

def publish(event)
  @events << event
end