Class: WinewooUser::Comments::ListComments
- Inherits:
-
BaseUseCase
- Object
- BaseUseCase
- WinewooUser::Comments::ListComments
- Defined in:
- lib/winewoo_core/use_cases/winewoo_user/comments/list_comments.rb
Instance Method Summary collapse
- #call(current_winewooer, wine_id, vintage_id, winewoo_user_id, filters) {|comments ? UseCaseResults.success(comments) : UseCaseResults.not_found| ... } ⇒ Object
-
#initialize(log_params = nil) ⇒ ListComments
constructor
A new instance of ListComments.
Constructor Details
#initialize(log_params = nil) ⇒ ListComments
Returns a new instance of ListComments.
4 5 6 |
# 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 |
Instance Method Details
#call(current_winewooer, wine_id, vintage_id, winewoo_user_id, filters) {|comments ? UseCaseResults.success(comments) : UseCaseResults.not_found| ... } ⇒ Object
9 10 11 12 13 14 15 |
# 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 |