Class: Gitlab::Ci::Charts::MonthChart

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

#initializeMonthChart

Returns a new instance of MonthChart.


88
89
90
91
92
93
94
# File 'lib/gitlab/ci/charts.rb', line 88

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

  super
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from


86
87
88
# File 'lib/gitlab/ci/charts.rb', line 86

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to


86
87
88
# File 'lib/gitlab/ci/charts.rb', line 86

def to
  @to
end