Module: WhatTheGem::Stats::Definitions
- Defined in:
- lib/whatthegem/stats/definitions.rb
Constant Summary collapse
- FIFTY_PLUS =
proc { |res| res == 50 ? '50+' : res }
- HAS_REACTION =
proc { |i| i[:labels].any? || i[:comments].positive? }
- T =
TimeCalc
Class Method Summary collapse
Class Method Details
.meters ⇒ Object
11 12 13 |
# File 'lib/whatthegem/stats/definitions.rb', line 11 def self.meters @meters ||= [] end |
.metric(name, *path, thresholds: nil, &block) ⇒ Object
15 16 17 |
# File 'lib/whatthegem/stats/definitions.rb', line 15 def self.metric(name, *path, thresholds: nil, &block) meters << Meter.new(name, path, thresholds, block || :itself.to_proc) end |