Class: WinewooCore::Repositories::Mongo::InterproWinesMongoRepo

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

Instance Method Summary collapse

Instance Method Details

#find(filters) ⇒ Object



10
11
12
# File 'lib/winewoo_core/repositories/mongo/interpro_wines_mongo_repo.rb', line 10

def find(filters)
  WinewooCore::Services::Finders::Wines::WinesFinderBuilder.build(filters).find
end

#get(wine_id) ⇒ Object



4
5
6
7
# File 'lib/winewoo_core/repositories/mongo/interpro_wines_mongo_repo.rb', line 4

def get(wine_id)
  return unless wine_id
  WinewooCore::Repositories::Mongo::Queries::WineQuery.new.published.find(wine_id)
end