Module: Memoh::Models::Concerns::Persistence::ClassMethods

Defined in:
lib/memoh/models/concerns/persistence.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#allObject



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_managerObject



26
27
28
# File 'lib/memoh/models/concerns/persistence.rb', line 26

def persistence_manager
  persistence_class.new(self)
end