Commit 5de47766 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Add attribute reader to project level

parent 198df06f
......@@ -2,19 +2,22 @@
module CycleAnalytics
class ProjectLevel < Base
attr_reader :project, :options
def initialize(project, options:)
@project = project
@options = options
end
def summary
@summary ||= ::Gitlab::CycleAnalytics::StageSummary.new(@project,
from: @options[:from],
current_user: @options[:current_user]).data
@summary ||= ::Gitlab::CycleAnalytics::StageSummary.new(project,
from: options[:from],
current_user: options[:current_user]).data
end
def permissions(user:)
Gitlab::CycleAnalytics::Permissions.get(user: user, project: @project)
Gitlab::CycleAnalytics::Permissions.get(user: user, project: project)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment