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

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

Instance Method Summary collapse

Methods included from Defaults

#links

Constructor Details

#initialize(project:, options:, current_user:) ⇒ Issue

Returns a new instance of Issue.


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

def initialize(project:, options:, current_user:)
  @project = project
  @options = options
  @current_user = current_user
end

Instance Method Details

#identifierObject


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

def identifier
  :issues
end

#titleObject


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

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

#valueObject


21
22
23
# File 'lib/gitlab/cycle_analytics/summary/issue.rb', line 21

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