Class: Fiveruns::Dash::PercentageMetric

Inherits:
Metric show all
Defined in:
lib/fiveruns/dash/metric.rb

Instance Attribute Summary

Attributes inherited from Metric

#description, #help_text, #name, #options, #recipe

Instance Method Summary collapse

Methods inherited from Metric

#==, #abstract?, #calculate, #data, #find_context_with, #info, #initialize, #key, #reset, #virtual?

Methods included from Typable

included

Constructor Details

This class inherits a constructor from Fiveruns::Dash::Metric

Instance Method Details

#validate!Object

Raises:

  • (ArgumentError)


390
391
392
393
# File 'lib/fiveruns/dash/metric.rb', line 390

def validate!
  super
  raise ArgumentError, "Can not set :unit for `#{@name}' percentage metric" if @options[:unit]
end