Class: Ci::Charts::WeekChart

Inherits:
Chart
  • Object
show all
Defined in:
lib/ci/charts.rb

Instance Attribute Summary

Attributes inherited from Chart

#build_times, #labels, #project, #success, #total

Instance Method Summary collapse

Methods inherited from Chart

#initialize, #push

Constructor Details

This class inherits a constructor from Ci::Charts::Chart

Instance Method Details

#collectObject


51
52
53
54
55
56
57
58
# File 'lib/ci/charts.rb', line 51

def collect
  7.times do |i|
    start_day = Date.today - 7.days + i.days
    end_day = Date.today - 7.days + i.day + 1.day

    push(start_day, end_day, "%d %B")
  end
end