Class: WinewooCore::Repositories::Mongo::CriterionsMongoRepo::Finder

Inherits:
Object
  • Object
show all
Defined in:
lib/winewoo_core/repositories/mongo/criterions_mongo_repo.rb

Instance Method Summary collapse

Constructor Details

#initialize(filters) ⇒ Finder

Returns a new instance of Finder.



45
46
47
# File 'lib/winewoo_core/repositories/mongo/criterions_mongo_repo.rb', line 45

def initialize(filters)
  @filters = filters
end

Instance Method Details

#map(found_criterions) ⇒ Object



50
51
52
53
54
# File 'lib/winewoo_core/repositories/mongo/criterions_mongo_repo.rb', line 50

def map(found_criterions)
  found_criterions.map do |criterion|
    serialize_criterion(criterion) unless criterion.blank?
  end.compact
end