Module: Memoh::Models::Concerns::Persistence::ClassMethods
- Defined in:
- lib/memoh/models/concerns/persistence.rb
Overview
:nodoc:
Instance Method Summary collapse
- #all ⇒ Object
- #find_by(attributes) ⇒ Object
- #identifier_field(field) ⇒ Object
- #persistence_manager ⇒ Object
Instance Method Details
#all ⇒ Object
18 19 20 |
# File 'lib/memoh/models/concerns/persistence.rb', line 18 def all persistence_manager.all end |
#find_by(attributes) ⇒ Object
22 23 24 |
# File 'lib/memoh/models/concerns/persistence.rb', line 22 def find_by(attributes) persistence_manager.find_by(attributes) end |
#identifier_field(field) ⇒ Object
30 31 32 |
# File 'lib/memoh/models/concerns/persistence.rb', line 30 def identifier_field(field) self.id_field = field end |
#persistence_manager ⇒ Object
26 27 28 |
# File 'lib/memoh/models/concerns/persistence.rb', line 26 def persistence_manager persistence_class.new(self) end |