Class: Yabeda::Kafka::Proxy::Counter
- Inherits:
-
Object
- Object
- Yabeda::Kafka::Proxy::Counter
- Defined in:
- lib/yabeda/kafka/proxy.rb
Instance Attribute Summary collapse
-
#yabeda_counter ⇒ Object
readonly
Returns the value of attribute yabeda_counter.
Instance Method Summary collapse
- #increment(labels:, by: 1) ⇒ Object
-
#initialize(yabeda_counter) ⇒ Counter
constructor
A new instance of Counter.
Constructor Details
#initialize(yabeda_counter) ⇒ Counter
Returns a new instance of Counter.
44 45 46 |
# File 'lib/yabeda/kafka/proxy.rb', line 44 def initialize(yabeda_counter) @yabeda_counter = yabeda_counter end |
Instance Attribute Details
#yabeda_counter ⇒ Object (readonly)
Returns the value of attribute yabeda_counter.
42 43 44 |
# File 'lib/yabeda/kafka/proxy.rb', line 42 def yabeda_counter @yabeda_counter end |
Instance Method Details
#increment(labels:, by: 1) ⇒ Object
48 49 50 |
# File 'lib/yabeda/kafka/proxy.rb', line 48 def increment(labels:, by: 1) yabeda_counter.increment(labels, by: by) end |