Class: ActiveSupport::EventReporter::TestHelper::EventSubscriber
- Defined in:
- activesupport/lib/active_support/event_reporter/test_helper.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Instance Method Summary collapse
- #emit(event) ⇒ Object
-
#initialize ⇒ EventSubscriber
constructor
A new instance of EventSubscriber.
Constructor Details
#initialize ⇒ EventSubscriber
Returns a new instance of EventSubscriber.
7 8 9 |
# File 'activesupport/lib/active_support/event_reporter/test_helper.rb', line 7 def initialize @events = [] end |
Instance Attribute Details
#events ⇒ Object (readonly)
Returns the value of attribute events.
5 6 7 |
# File 'activesupport/lib/active_support/event_reporter/test_helper.rb', line 5 def events @events end |
Instance Method Details
#emit(event) ⇒ Object
11 12 13 |
# File 'activesupport/lib/active_support/event_reporter/test_helper.rb', line 11 def emit(event) @events << event end |