Class: Counter::Cache::Counters::BufferCounter::Updater
- Inherits:
-
Struct
- Object
- Struct
- Counter::Cache::Counters::BufferCounter::Updater
- Defined in:
- lib/counter/cache/counters/buffer_counter/updater.rb
Instance Attribute Summary collapse
-
#counter_class_name ⇒ Object
Returns the value of attribute counter_class_name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#source_object ⇒ Object
Returns the value of attribute source_object.
Instance Method Summary collapse
Instance Attribute Details
#counter_class_name ⇒ Object
Returns the value of attribute counter_class_name
9 10 11 |
# File 'lib/counter/cache/counters/buffer_counter/updater.rb', line 9 def counter_class_name @counter_class_name end |
#options ⇒ Object
Returns the value of attribute options
9 10 11 |
# File 'lib/counter/cache/counters/buffer_counter/updater.rb', line 9 def @options end |
#source_object ⇒ Object
Returns the value of attribute source_object
9 10 11 |
# File 'lib/counter/cache/counters/buffer_counter/updater.rb', line 9 def source_object @source_object end |
Instance Method Details
#update!(direction) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/counter/cache/counters/buffer_counter/updater.rb', line 10 def update!(direction) return unless valid? incr if direction == :incr decr if direction == :decr enqueue end |