Class: FastCqrs::Transaction
- Inherits:
-
Object
- Object
- FastCqrs::Transaction
- Defined in:
- lib/fast_cqrs/transaction.rb
Overview
A base transaction class to process the request. Usage: Inherit and override the #call
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.inherited(klass) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/fast_cqrs/transaction.rb', line 13 def self.inherited(klass) super klass.class_eval do include Dry::Monads[:do, :result, :try] include Dry::Matcher.for(:call, with: Dry::Matcher::ResultMatcher) end end |
Instance Method Details
#call(_input, _auth: nil) ⇒ Object
21 22 23 |
# File 'lib/fast_cqrs/transaction.rb', line 21 def call(_input, _auth: nil) Success() end |