Class: Miteru::Service
- Inherits:
-
Object
show all
- Defined in:
- lib/miteru/service.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.call ⇒ Object
19
20
21
|
# File 'lib/miteru/service.rb', line 19
def call(...)
new.call(...)
end
|
.result ⇒ Object
23
24
25
|
# File 'lib/miteru/service.rb', line 23
def result(...)
new.result(...)
end
|
Instance Method Details
#call(*args, **kwargs) ⇒ Object
10
11
12
|
# File 'lib/miteru/service.rb', line 10
def call(*args, **kwargs)
raise NotImplementedError, "You must implement #{self.class}##{__method__}"
end
|
#result ⇒ Object
14
15
16
|
# File 'lib/miteru/service.rb', line 14
def result(...)
Try[StandardError] { call(...) }.to_result
end
|