Class: WinewooCore::Repositories::Mongo::InterproCriterionsMongoRepo::GrapesFinder

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

Instance Method Summary collapse

Methods inherited from Finder

#initialize

Constructor Details

This class inherits a constructor from WinewooCore::Repositories::Mongo::InterproCriterionsMongoRepo::Finder

Instance Method Details

#findObject



75
76
77
78
79
# File 'lib/winewoo_core/repositories/mongo/interpro_criterions_mongo_repo.rb', line 75

def find
  res = GlobalWineData.all.first.grapes
  res.select{ |grape| grape.match(/#{@filters.query}/) } if @filters.query
  return res
end