Class: FancyCount::Adapter
- Inherits:
-
Object
- Object
- FancyCount::Adapter
show all
- Defined in:
- lib/fancy_count/adapter.rb
Instance Method Summary
collapse
Constructor Details
#initialize(name, config) ⇒ Adapter
Returns a new instance of Adapter.
5
6
7
8
|
# File 'lib/fancy_count/adapter.rb', line 5
def initialize(name, config)
@name = name
@config = config
end
|
Instance Method Details
#change(value) ⇒ Object
18
19
20
|
# File 'lib/fancy_count/adapter.rb', line 18
def change(value)
counter.value = value
end
|
#decrement ⇒ Object
14
15
16
|
# File 'lib/fancy_count/adapter.rb', line 14
def decrement
counter.decrement
end
|
#delete ⇒ Object
30
31
32
|
# File 'lib/fancy_count/adapter.rb', line 30
def delete
counter.delete
end
|
#increment ⇒ Object
10
11
12
|
# File 'lib/fancy_count/adapter.rb', line 10
def increment
counter.increment
end
|
#reset ⇒ Object
22
23
24
|
# File 'lib/fancy_count/adapter.rb', line 22
def reset
counter.value = 0
end
|
#value ⇒ Object
26
27
28
|
# File 'lib/fancy_count/adapter.rb', line 26
def value
counter.value
end
|