class Upgrow::BasicRepository
Base class for Repositories. It offers a basic API for the state all Repositories should have, as well as the logic on how to materialize data into Models.
Attributes
base[W]
base[R]
Public Class Methods
base()
click to toggle source
the base object to be used internally to retrieve the persisted data. For example, a base class in which queries can be performed for a relational database adapter. Defaults to `nil`.
@return [Object] the Repository
base.
# File lib/upgrow/basic_repository.rb, line 16 def base @base || default_base end
new()
click to toggle source
Sets the Basic Repositorie's state.
# File lib/upgrow/basic_repository.rb, line 28 def initialize @base = self.class.base end
Private Class Methods
default_base()
click to toggle source
# File lib/upgrow/basic_repository.rb, line 22 def default_base; end