Class: WinewooUser::Account::ShowWinewooUser
- Inherits:
-
BaseUseCase
- Object
- BaseUseCase
- WinewooUser::Account::ShowWinewooUser
- Defined in:
- lib/winewoo_core/use_cases/winewoo_user/account/show_winewoo_user.rb
Instance Method Summary collapse
- #call(winewoo_user_id) {|winewoo_user ? UseCaseResults.found(winewoo_user) : UseCaseResults.not_found| ... } ⇒ Object
-
#initialize(log_params = nil) ⇒ ShowWinewooUser
constructor
A new instance of ShowWinewooUser.
Constructor Details
#initialize(log_params = nil) ⇒ ShowWinewooUser
Returns a new instance of ShowWinewooUser.
4 5 6 |
# File 'lib/winewoo_core/use_cases/winewoo_user/account/show_winewoo_user.rb', line 4 def initialize(log_params=nil) super(WinewooCore.winewoo_users_repo.new, log_params) end |
Instance Method Details
#call(winewoo_user_id) {|winewoo_user ? UseCaseResults.found(winewoo_user) : UseCaseResults.not_found| ... } ⇒ Object
9 10 11 12 13 14 |
# File 'lib/winewoo_core/use_cases/winewoo_user/account/show_winewoo_user.rb', line 9 def call(winewoo_user_id) winewoo_user = self.repo.get(winewoo_user_id) yield winewoo_user ? UseCaseResults.found(winewoo_user) : UseCaseResults.not_found end |