Class: Cased::Publishers::TestPublisher
- Defined in:
- lib/cased/publishers/test_publisher.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Instance Method Summary collapse
-
#initialize ⇒ TestPublisher
constructor
A new instance of TestPublisher.
- #publish(event) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ TestPublisher
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
#events ⇒ Object (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 |