Class: Gitlab::Ci::Charts::YearChart

Inherits:
Chart
  • Object
show all
Includes:
MonthlyInterval
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 MonthlyInterval

#grouped_count, #interval_step

Methods inherited from Chart

#collect

Constructor Details

#initializeYearChart

Returns a new instance of YearChart.


75
76
77
78
79
80
81
# File 'lib/gitlab/ci/charts.rb', line 75

def initialize(*)
  @to     = Date.today.end_of_month.end_of_day
  @from   = @to.years_ago(1).beginning_of_month.beginning_of_day
  @format = '%d %B %Y'

  super
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from


73
74
75
# File 'lib/gitlab/ci/charts.rb', line 73

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to


73
74
75
# File 'lib/gitlab/ci/charts.rb', line 73

def to
  @to
end