Class: Yabeda::DSL::MetricBuilder

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

Overview

Handles DSL for working with individual metrics

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metric_klass) ⇒ Object

Parameters:

  • metric_klass

Instance Attribute Details

#metric_klassObject (readonly)

Reader method for the metric_klass initializer parameter.



11
# File 'lib/yabeda/dsl/metric_builder.rb', line 11

param :metric_klass

Instance Method Details

#build(args, kwargs, group, &block) ⇒ Object



13
14
15
16
# File 'lib/yabeda/dsl/metric_builder.rb', line 13

def build(args, kwargs, group, &block)
  options = OptionBuilder.new(metric_klass, kwargs).options_from(&block)
  initialize_metric(args, options, group)
end