Class: Yabeda::Kafka::Proxy::Counter

Inherits:
Object
  • Object
show all
Defined in:
lib/yabeda/kafka/proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_counterObject (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