Class: AnyGood::Meter

Inherits:
Struct
  • Object
show all
Defined in:
lib/any_good/meters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



2
3
4
# File 'lib/any_good/meters.rb', line 2

def block
  @block
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/any_good/meters.rb', line 2

def name
  @name
end

#thresholdsObject

Returns the value of attribute thresholds

Returns:

  • (Object)

    the current value of thresholds



2
3
4
# File 'lib/any_good/meters.rb', line 2

def thresholds
  @thresholds
end

Instance Method Details

#call(data) ⇒ Object



3
4
5
# File 'lib/any_good/meters.rb', line 3

def call(data)
  Metric.new(name, value(data), *thresholds)
end