Class: Moneta::Adapters::MongoBase Private
- Inherits:
-
Object
- Object
- Moneta::Adapters::MongoBase
- Includes:
- Defaults, ExpiresSupport
- Defined in:
- lib/moneta/adapters/mongo/base.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_PORT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
27017
Instance Attribute Summary collapse
- #backend ⇒ Object readonly private
Attributes included from ExpiresSupport
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ MongoBase
constructor
private
A new instance of MongoBase.
Methods included from Defaults
#[], #[]=, #close, #create, #decrement, #features, #fetch, included, #increment, #key?, #supports?
Methods included from OptionSupport
#expires, #prefix, #raw, #with
Constructor Details
#initialize(options = {}) ⇒ MongoBase
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of MongoBase.
15 16 17 18 19 20 |
# File 'lib/moneta/adapters/mongo/base.rb', line 15 def initialize( = {}) self.default_expires = .delete(:expires) @expires_field = .delete(:expires_field) || 'expiresAt' @value_field = .delete(:value_field) || 'value' @type_field = .delete(:type_field) || 'type' end |
Instance Attribute Details
#backend ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/moneta/adapters/mongo/base.rb', line 11 def backend @backend end |