Class: Falconer::Store::Memory

Inherits:
Object
  • Object
show all
Defined in:
lib/falconer/store/memory.rb

Instance Method Summary collapse

Constructor Details

#initializeMemory

Returns a new instance of Memory.



5
6
7
# File 'lib/falconer/store/memory.rb', line 5

def initialize
  @events = []
end

Instance Method Details

#add_event(event, data = nil) ⇒ Object



9
10
11
# File 'lib/falconer/store/memory.rb', line 9

def add_event(event, data=nil)
  @events << [event, data]
end

#clear_eventsObject



17
18
19
# File 'lib/falconer/store/memory.rb', line 17

def clear_events
  @events = []
end

#eventsObject



13
14
15
# File 'lib/falconer/store/memory.rb', line 13

def events
  @events.dup
end