Class: Docket::Storage::Base
- Inherits:
-
Object
- Object
- Docket::Storage::Base
- Defined in:
- lib/docket/storage/base.rb
Instance Attribute Summary collapse
-
#db ⇒ Object
Returns the value of attribute db.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
Instance Method Summary collapse
- #append(key, value) ⇒ Object
- #clear! ⇒ Object
- #close ⇒ Object
- #closed? ⇒ Boolean
-
#initialize(args = {}) ⇒ Base
constructor
A new instance of Base.
- #load ⇒ Object
- #read(key) ⇒ Object
- #remove(key) ⇒ Object
- #save(key, value, options = {}) ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/docket/storage/base.rb', line 6 def initialize args={} self.namespace = args[:namespace] || Docket.configuration.storage_namespace end |
Instance Attribute Details
#db ⇒ Object
Returns the value of attribute db.
4 5 6 |
# File 'lib/docket/storage/base.rb', line 4 def db @db end |
#namespace ⇒ Object
Returns the value of attribute namespace.
4 5 6 |
# File 'lib/docket/storage/base.rb', line 4 def namespace @namespace end |
Instance Method Details
#append(key, value) ⇒ Object
13 14 |
# File 'lib/docket/storage/base.rb', line 13 def append key, value end |
#clear! ⇒ Object
31 32 |
# File 'lib/docket/storage/base.rb', line 31 def clear! end |
#close ⇒ Object
25 26 |
# File 'lib/docket/storage/base.rb', line 25 def close end |
#closed? ⇒ Boolean
28 29 |
# File 'lib/docket/storage/base.rb', line 28 def closed? end |
#load ⇒ Object
22 23 |
# File 'lib/docket/storage/base.rb', line 22 def load end |
#read(key) ⇒ Object
19 20 |
# File 'lib/docket/storage/base.rb', line 19 def read key end |
#remove(key) ⇒ Object
16 17 |
# File 'lib/docket/storage/base.rb', line 16 def remove key end |
#save(key, value, options = {}) ⇒ Object
10 11 |
# File 'lib/docket/storage/base.rb', line 10 def save key, value, ={} end |