Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2017-11-28 16:36:12 +0300
committerMatija Čupić <matteeyah@gmail.com>2017-11-28 16:39:18 +0300
commit899a80955ca694a119f52d8f717c1f86066e6880 (patch)
tree86de74417aca6d390eca2b5757d72c70b863fede /app/finders
parent6f720390073beef93c95af5e45475421beb03b07 (diff)
Use attr_reader instead of instance variables
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/clusters_finder.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/finders/clusters_finder.rb b/app/finders/clusters_finder.rb
index 26bae3193da..c13f98257bf 100644
--- a/app/finders/clusters_finder.rb
+++ b/app/finders/clusters_finder.rb
@@ -1,6 +1,4 @@
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