class AnyGood::Meter

Attributes

data[R]

Public Instance Methods

call(data) click to toggle source
# File lib/any_good/meters.rb, line 3
def call(data)
  Metric.new(name, value(data), *thresholds)
end

Private Instance Methods

value(data) click to toggle source
# File lib/any_good/meters.rb, line 11
def value(data)
  @data = data
  instance_eval(&block)
rescue NoMethodError
  nil
ensure
  @data = nil
end