Class: Ci::Charts::MonthChart

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


40
41
42
43
44
45
46
47
# File 'lib/ci/charts.rb', line 40

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

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