Class: FastExists::Backends::Null
- Inherits:
-
Base
- Object
- Base
- FastExists::Backends::Null
show all
- Defined in:
- lib/fast_exists/backends/null.rb
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #load, #rebuild, #save
Instance Method Details
#add(_key) ⇒ Object
6
7
8
|
# File 'lib/fast_exists/backends/null.rb', line 6
def add(_key)
true
end
|
#capacity ⇒ Object
22
23
24
|
# File 'lib/fast_exists/backends/null.rb', line 22
def capacity
@expected_elements
end
|
#clear ⇒ Object
14
15
16
|
# File 'lib/fast_exists/backends/null.rb', line 14
def clear
true
end
|
#contains?(_key) ⇒ Boolean
10
11
12
|
# File 'lib/fast_exists/backends/null.rb', line 10
def contains?(_key)
true end
|
#count ⇒ Object
18
19
20
|
# File 'lib/fast_exists/backends/null.rb', line 18
def count
0
end
|
#stats ⇒ Object
26
27
28
|
# File 'lib/fast_exists/backends/null.rb', line 26
def stats
{ backend: :null, capacity: capacity, count: 0, status: :disabled }
end
|