Class: Doodle::Keyword::FinderService
- Inherits:
-
Object
- Object
- Doodle::Keyword::FinderService
- Defined in:
- app/services/doodle/keyword/finder_service.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(params) ⇒ FinderService
constructor
A new instance of FinderService.
Constructor Details
#initialize(params) ⇒ FinderService
Returns a new instance of FinderService.
3 4 5 |
# File 'app/services/doodle/keyword/finder_service.rb', line 3 def initialize(params) @params = params end |
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/services/doodle/keyword/finder_service.rb', line 7 def call scope = nil @params.each do |k, v| scope = Doodle::Keyword.where(k, v) end scope.all end |