Class: Doodle::Channel::FinderService

Inherits:
Object
  • Object
show all
Defined in:
app/services/doodle/channel/finder_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ FinderService

Returns a new instance of FinderService.



3
4
5
# File 'app/services/doodle/channel/finder_service.rb', line 3

def initialize(params)
  @params = params
end

Instance Method Details

#callObject



7
8
9
10
11
12
13
# File 'app/services/doodle/channel/finder_service.rb', line 7

def call
  scope = nil
  @params.each do |k, v|
    scope = Doodle::Channel.where({k => v})
  end
  scope.all
end