Module: Moneta::OptionSupport Private
- Included in:
- Defaults
- Defined in:
- lib/moneta/mixins.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
Instance Method Details
#expires(expires) ⇒ Object
25 26 27 |
# File 'lib/moneta/mixins.rb', line 25 def expires(expires) with(:expires => expires, :only => [:store, :increment]) end |
#prefix(prefix) ⇒ Object
20 21 22 |
# File 'lib/moneta/mixins.rb', line 20 def prefix(prefix) with(:prefix => prefix, :except => :clear) end |
#raw ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/moneta/mixins.rb', line 10 def raw @raw_store ||= begin store = with(:raw => true, :only => [:load, :store, :delete]) store.instance_variable_set(:@raw_store, store) store end end |
#with(options) ⇒ Object
5 6 7 |
# File 'lib/moneta/mixins.rb', line 5 def with() OptionMerger.new(self, ) end |