Class: Yabeda::Group

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/yabeda/group.rb

Overview

Represents a set of metrics grouped under the same name

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Object

Parameters:

  • name

Instance Attribute Details

#nameObject (readonly)

Reader method for the name initializer parameter.


10
# File 'lib/yabeda/group.rb', line 10

param :name

Instance Method Details

#register_metric(metric) ⇒ Object


12
13
14
# File 'lib/yabeda/group.rb', line 12

def register_metric(metric)
  define_singleton_method(metric.name) { metric }
end