Class: Zache::Fake
- Inherits:
-
Object
- Object
- Zache::Fake
- Defined in:
- lib/zache.rb
Overview
Fake implementation that doesn’t cache anything, but behaves like it does. It implements all methods of the original class, but doesn’t do any caching. This is very useful for testing.
Instance Method Summary collapse
- #clean ⇒ Object
- #exists? ⇒ Boolean
- #get ⇒ Object
- #locked? ⇒ Boolean
- #put ⇒ Object
- #remove(_key) ⇒ Object
- #remove_all ⇒ Object
- #size ⇒ Object
Instance Method Details
#clean ⇒ Object
66 |
# File 'lib/zache.rb', line 66 def clean; end |
#exists? ⇒ Boolean
52 53 54 |
# File 'lib/zache.rb', line 52 def exists?(*) true end |
#get ⇒ Object
48 49 50 |
# File 'lib/zache.rb', line 48 def get(*) yield end |
#locked? ⇒ Boolean
56 57 58 |
# File 'lib/zache.rb', line 56 def locked? false end |
#put ⇒ Object
60 |
# File 'lib/zache.rb', line 60 def put(*); end |
#remove(_key) ⇒ Object
62 |
# File 'lib/zache.rb', line 62 def remove(_key); end |
#remove_all ⇒ Object
64 |
# File 'lib/zache.rb', line 64 def remove_all; end |
#size ⇒ Object
44 45 46 |
# File 'lib/zache.rb', line 44 def size 1 end |