class Blackbeard::MetricDate
Attributes
date[R]
TODO refactor with MetricHour
to be compaosed
result[R]
TODO refactor with MetricHour
to be compaosed
Public Class Methods
new(date, result)
click to toggle source
# File lib/blackbeard/metric_date.rb, line 6 def initialize(date, result) @date = date @result = result end
Public Instance Methods
result_rows(segments)
click to toggle source
# File lib/blackbeard/metric_date.rb, line 15 def result_rows(segments) [@date.to_s] + results_for(segments) end
results_for(segments)
click to toggle source
# File lib/blackbeard/metric_date.rb, line 11 def results_for(segments) segments.map{|s| result[s].to_f } end