Class: Gitlab::Ci::Charts::WeekChart

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

Instance Attribute Summary collapse

Attributes inherited from Chart

#labels, #pipeline_times, #project, #success, #total

Instance Method Summary collapse

Methods included from DailyInterval

#grouped_count, #interval_step

Methods inherited from Chart

#collect

Constructor Details

#initializeWeekChart

Returns a new instance of WeekChart.


101
102
103
104
105
106
107
# File 'lib/gitlab/ci/charts.rb', line 101

def initialize(*)
  @to     = Date.today.end_of_day
  @from   = 1.week.ago.beginning_of_day
  @format = '%d %B'

  super
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from


99
100
101
# File 'lib/gitlab/ci/charts.rb', line 99

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to


99
100
101
# File 'lib/gitlab/ci/charts.rb', line 99

def to
  @to
end