Class: Falconer::Store::Memory
- Inherits:
-
Object
- Object
- Falconer::Store::Memory
- Defined in:
- lib/falconer/store/memory.rb
Instance Method Summary collapse
- #add_event(event, data = nil) ⇒ Object
- #clear_events ⇒ Object
- #events ⇒ Object
-
#initialize ⇒ Memory
constructor
A new instance of Memory.
Constructor Details
#initialize ⇒ Memory
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_events ⇒ Object
17 18 19 |
# File 'lib/falconer/store/memory.rb', line 17 def clear_events @events = [] end |
#events ⇒ Object
13 14 15 |
# File 'lib/falconer/store/memory.rb', line 13 def events @events.dup end |