Module: Operto::Operation
- Included in:
- AccessTokens::Upsert, Homes::Index, Issues::Close, Issues::Index, Staff::Index, StaffTaskTimes::Index, StaffTasks::Create, StaffTasks::Destroy, Tasks::Create, Tasks::Index, Tasks::Update
- Defined in:
- lib/operto/operation.rb,
sig/operto.rbs
Overview
#call! returns the same Result as #call, raising the failure instead of
wrapping it — hence the alias call! call on every operation below.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/operto/operation.rb', line 5 def self.included(base) base.include Dry::Monads[:result] end |
Instance Method Details
#call! ⇒ Object
9 10 11 12 13 14 |
# File 'lib/operto/operation.rb', line 9 def call!(...) result = call(...) raise result.failure if result.failure? result end |