Method: Vanity::Playground#metric

Defined in:
lib/vanity/playground.rb

#metric(id) ⇒ Object

Returns a metric (raises NameError if no metric with that identifier).

See Also:

Since:

  • 1.1.0



161
162
163
# File 'lib/vanity/playground.rb', line 161

def metric(id)
  metrics[id.to_sym] or raise NameError, "No metric #{id}"
end