Class: Moneta::DataMapper
- Inherits:
-
Object
- Object
- Moneta::DataMapper
- Includes:
- Implementation, Expires
- Defined in:
- lib/moneta/datamapper.rb
Defined Under Namespace
Modules: Implementation Classes: Expiration
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ DataMapper
constructor
A new instance of DataMapper.
Methods included from Expires
#[], #check_expired, #delete, #fetch, #has_key?, #key?, #store, #update_key
Methods included from Implementation
#[], #[]=, #clear, #delete, #fetch, #has_key?, #key?, #store
Constructor Details
#initialize(options = {}) ⇒ DataMapper
Returns a new instance of DataMapper.
57 58 59 60 61 62 |
# File 'lib/moneta/datamapper.rb', line 57 def initialize( = {}) ::DataMapper.setup(:moneta, [:setup]) MonetaHash.auto_upgrade! @hash = MonetaHash @expiration = Expiration.new(MonetaHash) end |