Class: WinewooUser::History::GetHistory
- Inherits:
-
BaseUseCase
- Object
- BaseUseCase
- WinewooUser::History::GetHistory
- Defined in:
- lib/winewoo_core/use_cases/winewoo_user/history/get_history.rb
Instance Method Summary collapse
- #call(winewoo_user, filters) {|history_entries ? UseCaseResults.found(history_entries) : UseCaseResults.failure| ... } ⇒ Object
-
#initialize(log_params = nil) ⇒ GetHistory
constructor
A new instance of GetHistory.
Constructor Details
#initialize(log_params = nil) ⇒ GetHistory
Returns a new instance of GetHistory.
4 5 6 |
# File 'lib/winewoo_core/use_cases/winewoo_user/history/get_history.rb', line 4 def initialize(log_params=nil) super(WinewooCore.history_repo.new, log_params) end |
Instance Method Details
#call(winewoo_user, filters) {|history_entries ? UseCaseResults.found(history_entries) : UseCaseResults.failure| ... } ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/winewoo_core/use_cases/winewoo_user/history/get_history.rb', line 9 def call(winewoo_user, filters) history_entries = self.repo.find(winewoo_user, filters) yield history_entries ? UseCaseResults.found(history_entries) : UseCaseResults.failure end |