Class: MetricValue
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- MetricValue
- Defined in:
- app/models/metric_value.rb
Overview
Instance Method Summary collapse
Instance Method Details
#time_for_graph(hours = 4) ⇒ Object
19 20 21 |
# File 'app/models/metric_value.rb', line 19 def time_for_graph(hours = 4) time - time.sec - time.min * 60 - (time.hour % hours * 3600) + hours.hours end |