Commit 899a8095 authored by Matija Čupić's avatar Matija Čupić

Use attr_reader instead of instance variables

parent 6f720390
Pipeline #14466891 failed with stages
in 126 minutes and 24 seconds
class ClustersFinder
attr_reader :project, :user, :scope
def initialize(project, user, scope)
@project = project
@user = user
......@@ -14,8 +12,10 @@ class ClustersFinder
private
attr_reader :project, :user, :scope
def filter_by_scope(clusters)
case @scope.to_sym
case scope.to_sym
when :all
clusters
when :inactive
......@@ -23,7 +23,7 @@ class ClustersFinder
when :active
clusters.enabled
else
raise "Invalid scope #{@scope}"
raise "Invalid scope #{scope}"
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