Class: Cyclotone::Backends::NullBackend
- Inherits:
-
Object
- Object
- Cyclotone::Backends::NullBackend
- Defined in:
- lib/cyclotone/backends/null_backend.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Instance Method Summary collapse
- #close ⇒ Object
- #flush ⇒ Object
-
#initialize ⇒ NullBackend
constructor
A new instance of NullBackend.
- #panic ⇒ Object
- #send_event(event, at:, **options) ⇒ Object
Constructor Details
#initialize ⇒ NullBackend
Returns a new instance of NullBackend.
8 9 10 |
# File 'lib/cyclotone/backends/null_backend.rb', line 8 def initialize @events = [] end |
Instance Attribute Details
#events ⇒ Object (readonly)
Returns the value of attribute events.
6 7 8 |
# File 'lib/cyclotone/backends/null_backend.rb', line 6 def events @events end |
Instance Method Details
#close ⇒ Object
22 23 24 |
# File 'lib/cyclotone/backends/null_backend.rb', line 22 def close self end |
#flush ⇒ Object
17 18 19 20 |
# File 'lib/cyclotone/backends/null_backend.rb', line 17 def flush @events.clear self end |
#panic ⇒ Object
26 27 28 |
# File 'lib/cyclotone/backends/null_backend.rb', line 26 def panic self end |
#send_event(event, at:, **options) ⇒ Object
12 13 14 15 |
# File 'lib/cyclotone/backends/null_backend.rb', line 12 def send_event(event, at:, **) @events << { event: event, at: at, options: } self end |