Class: ClustersFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/clusters_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(clusterable, user, scope) ⇒ ClustersFinder

Returns a new instance of ClustersFinder.


4
5
6
7
8
# File 'app/finders/clusters_finder.rb', line 4

def initialize(clusterable, user, scope)
  @clusterable = clusterable
  @user = user
  @scope = scope || :active
end

Instance Method Details

#executeObject


10
11
12
13
# File 'app/finders/clusters_finder.rb', line 10

def execute
  clusters = clusterable.clusters
  filter_by_scope(clusters)
end