Class: Cyclotone::Backends::NullBackend

Inherits:
Object
  • Object
show all
Defined in:
lib/cyclotone/backends/null_backend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNullBackend

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

#eventsObject (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

#closeObject



22
23
24
# File 'lib/cyclotone/backends/null_backend.rb', line 22

def close
  self
end

#flushObject



17
18
19
20
# File 'lib/cyclotone/backends/null_backend.rb', line 17

def flush
  @events.clear
  self
end

#panicObject



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:, **options)
  @events << { event: event, at: at, options: options }
  self
end