Class: Nanoc::Telemetry::Counter

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/telemetry/counter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCounter

Returns a new instance of Counter



7
8
9
# File 'lib/nanoc/telemetry/counter.rb', line 7

def initialize
  @value = 0
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value



5
6
7
# File 'lib/nanoc/telemetry/counter.rb', line 5

def value
  @value
end

Instance Method Details

#incrementObject



11
12
13
# File 'lib/nanoc/telemetry/counter.rb', line 11

def increment
  @value += 1
end