class WinewooCore::UseCases::WinewooUser::Comments::ShowComment

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/show_comment.rb, line 4
def initialize(log_params=nil)
  super(WinewooCore.comments_repo.new, log_params)
end

Public Instance Methods

call(wine_id, vintage_id, comment_id) { |comment ? success: not_found| ... } click to toggle source
# File lib/winewoo_core/use_cases/winewoo_user/comments/show_comment.rb, line 9
def call(wine_id, vintage_id, comment_id)
  comment = self.repo.show(wine_id, vintage_id, comment_id)

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