Class: Gitlab::CycleAnalytics::Summary::Issue

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/cycle_analytics/summary/issue.rb

Instance Method Summary collapse

Constructor Details

#initialize(project:, from:, to: nil, current_user:) ⇒ Issue

Returns a new instance of Issue.


7
8
9
10
11
12
# File 'lib/gitlab/cycle_analytics/summary/issue.rb', line 7

def initialize(project:, from:, to: nil, current_user:)
  @project = project
  @from = from
  @to = to
  @current_user = current_user
end

Instance Method Details

#titleObject


14
15
16
# File 'lib/gitlab/cycle_analytics/summary/issue.rb', line 14

def title
  n_('New Issue', 'New Issues', value.to_i)
end

#valueObject


18
19
20
# File 'lib/gitlab/cycle_analytics/summary/issue.rb', line 18

def value
  @value ||= Value::PrettyNumeric.new(issues_count)
end