Class: DohLog::MemoryAcceptor

Inherits:
Object
  • Object
show all
Defined in:
lib/dohlog/memory_acceptor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMemoryAcceptor

Returns a new instance of MemoryAcceptor.



6
7
8
# File 'lib/dohlog/memory_acceptor.rb', line 6

def initialize
  @events = []
end

Instance Attribute Details

#eventsObject

Returns the value of attribute events.



4
5
6
# File 'lib/dohlog/memory_acceptor.rb', line 4

def events
  @events
end

Instance Method Details

#add(event) ⇒ Object



10
11
12
# File 'lib/dohlog/memory_acceptor.rb', line 10

def add(event)
  @events << event
end

#shutdownObject



14
15
16
# File 'lib/dohlog/memory_acceptor.rb', line 14

def shutdown
  @events.clear
end