Class: MetalArchives::Cache::Base
- Inherits:
-
Object
- Object
- MetalArchives::Cache::Base
- Defined in:
- lib/metal_archives/cache/base.rb
Overview
Generic cache interface
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #[] ⇒ Object
- #[]=(_key, _value) ⇒ Object
- #clear ⇒ Object
- #delete(_key) ⇒ Object
- #include?(_key) ⇒ Boolean
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #validate! ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
11 12 13 14 15 |
# File 'lib/metal_archives/cache/base.rb', line 11 def initialize( = {}) @options = validate! end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/metal_archives/cache/base.rb', line 9 def @options end |
Instance Method Details
#[] ⇒ Object
19 20 21 |
# File 'lib/metal_archives/cache/base.rb', line 19 def [] raise NotImplementedError end |
#[]=(_key, _value) ⇒ Object
23 24 25 |
# File 'lib/metal_archives/cache/base.rb', line 23 def []=(_key, _value) raise NotImplementedError end |
#clear ⇒ Object
27 28 29 |
# File 'lib/metal_archives/cache/base.rb', line 27 def clear raise NotImplementedError end |
#delete(_key) ⇒ Object
35 36 37 |
# File 'lib/metal_archives/cache/base.rb', line 35 def delete(_key) raise NotImplementedError end |
#include?(_key) ⇒ Boolean
31 32 33 |
# File 'lib/metal_archives/cache/base.rb', line 31 def include?(_key) raise NotImplementedError end |
#validate! ⇒ Object
17 |
# File 'lib/metal_archives/cache/base.rb', line 17 def validate!; end |