Class: Hanikamu::Service
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Hanikamu::Service
- Defined in:
- lib/hanikamu/service.rb
Overview
:nodoc
Constant Summary collapse
- Error =
Class.new(StandardError)
Class Method Summary collapse
Class Method Details
.call(options = {}) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/hanikamu/service.rb', line 13 def call( = {}) Success(call!()) rescue StandardError => e return Failure.new(e) if whitelisted_error?(e.class) raise e end |
.call!(options = {}) ⇒ Object
21 22 23 |
# File 'lib/hanikamu/service.rb', line 21 def call!( = {}) .empty? ? new.send(:call!) : new().send(:call!) end |