Class: Serum::Rails::Metrics
- Inherits:
-
Object
- Object
- Serum::Rails::Metrics
- Defined in:
- lib/serum/rails/metrics.rb
Class Attribute Summary collapse
-
.metrics ⇒ Object
readonly
Returns the value of attribute metrics.
Instance Method Summary collapse
-
#initialize(root) ⇒ Metrics
constructor
A new instance of Metrics.
- #to_hash ⇒ Object
Constructor Details
Class Attribute Details
.metrics ⇒ Object (readonly)
Returns the value of attribute metrics.
7 8 9 |
# File 'lib/serum/rails/metrics.rb', line 7 def metrics @metrics end |
Instance Method Details
#to_hash ⇒ Object
111 112 113 114 115 116 117 |
# File 'lib/serum/rails/metrics.rb', line 111 def to_hash hash = {} self.class.metrics.sort_by(&:to_s).each do |metric| hash[metric] = send(metric) end hash end |