Module: Mobility::Backend::ClassMethods
- Defined in:
- lib/mobility/backend.rb
Instance Method Summary collapse
-
#apply_plugin(_) ⇒ Boolean
Called from plugins to apply custom processing for this backend.
-
#for(_) ⇒ self
Attributes uses this method to get a backend class specific to the model using the backend.
Instance Method Details
#apply_plugin(_) ⇒ Boolean
Note:
This is currently only called by Plugins::Cache.
Called from plugins to apply custom processing for this backend. Name is the name of the plugin.
172 173 174 |
# File 'lib/mobility/backend.rb', line 172 def apply_plugin(_) false end |
#for(_) ⇒ self
Attributes uses this method to get a backend class specific to the model using the backend. Backend classes can override this method to return a class specific to the model class using the backend (e.g. either an ActiveRecord or Sequel backend class depending on whether the model is an ActiveRecord model or a Sequel model.)
163 164 165 |
# File 'lib/mobility/backend.rb', line 163 def for(_) self end |