Class: Persistors::Base

Inherits:
Object show all
Defined in:
lib/volt/models/persistors/base.rb

Overview

Implements the base persistor functionality.

Direct Known Subclasses

Flash, LocalStore, Params, Store

Instance Method Summary collapse

Instance Method Details

#added(model, index) ⇒ Object



10
11
# File 'lib/volt/models/persistors/base.rb', line 10

def added(model, index)
end

#changed(attribute_name) ⇒ Object



7
8
# File 'lib/volt/models/persistors/base.rb', line 7

def changed(attribute_name)
end

#event_added(event, scope_provider, first, first_for_event) ⇒ Object



18
19
# File 'lib/volt/models/persistors/base.rb', line 18

def event_added(event, scope_provider, first, first_for_event)
end

#event_removed(event, last, last_for_event) ⇒ Object



21
22
# File 'lib/volt/models/persistors/base.rb', line 21

def event_removed(event, last, last_for_event)
end

#loaded(initial_state = nil) ⇒ Object



4
5
# File 'lib/volt/models/persistors/base.rb', line 4

def loaded(initial_state=nil)
end

#removed(attribute_name) ⇒ Object

For removed, the default action is to call changed for it



14
15
16
# File 'lib/volt/models/persistors/base.rb', line 14

def removed(attribute_name)
  changed(attribute_name)
end