Add attribute reader to project level
This commit is contained in:
parent
198df06fea
commit
5de47766a7
1 changed files with 7 additions and 4 deletions
|
@ -2,19 +2,22 @@
|
||||||
|
|
||||||
module CycleAnalytics
|
module CycleAnalytics
|
||||||
class ProjectLevel < Base
|
class ProjectLevel < Base
|
||||||
|
|
||||||
|
attr_reader :project, :options
|
||||||
|
|
||||||
def initialize(project, options:)
|
def initialize(project, options:)
|
||||||
@project = project
|
@project = project
|
||||||
@options = options
|
@options = options
|
||||||
end
|
end
|
||||||
|
|
||||||
def summary
|
def summary
|
||||||
@summary ||= ::Gitlab::CycleAnalytics::StageSummary.new(@project,
|
@summary ||= ::Gitlab::CycleAnalytics::StageSummary.new(project,
|
||||||
from: @options[:from],
|
from: options[:from],
|
||||||
current_user: @options[:current_user]).data
|
current_user: options[:current_user]).data
|
||||||
end
|
end
|
||||||
|
|
||||||
def permissions(user:)
|
def permissions(user:)
|
||||||
Gitlab::CycleAnalytics::Permissions.get(user: user, project: @project)
|
Gitlab::CycleAnalytics::Permissions.get(user: user, project: project)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue