Class: Mnemonic::Metric::HashMetric::Submetric

Inherits:
Base
  • Object
show all
Defined in:
lib/mnemonic/metric/hash_metric.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#diff, #diff_from_start, #name, #prev_value, #start_value, #value

Instance Method Summary collapse

Methods inherited from Base

#each_submetric, #refresh!, #start!

Constructor Details

#initialize(parent, key, kind) ⇒ Submetric

Returns a new instance of Submetric.



7
8
9
10
11
12
# File 'lib/mnemonic/metric/hash_metric.rb', line 7

def initialize(parent, key, kind)
  @parent = parent
  @key = key
  @name = "#{parent.name}(#{key.inspect})"
  @kind = kind
end

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



5
6
7
# File 'lib/mnemonic/metric/hash_metric.rb', line 5

def kind
  @kind
end