class WinewooCore::UseCases::WinewooUser::Comments::ListComments

Public Class Methods

new(log_params=nil) click to toggle source
Calls superclass method WinewooCore::UseCases::BaseUseCase::new
# File lib/winewoo_core/use_cases/winewoo_user/comments/list_comments.rb, line 4
def initialize(log_params=nil)
  super(WinewooCore.comments_repo.new, log_params)
end

Public Instance Methods

call(current_winewooer, wine_id, vintage_id, winewoo_user_id, filters) { |comments ? success: not_found| ... } click to toggle source
# File lib/winewoo_core/use_cases/winewoo_user/comments/list_comments.rb, line 9
def call(current_winewooer, wine_id, vintage_id, winewoo_user_id, filters)
  comments = self.repo.find(current_winewooer, wine_id, vintage_id, winewoo_user_id, filters)

  yield comments ?
    UseCaseResults.success(comments) :
    UseCaseResults.not_found
end