lib/mihari/service.rb in mihari-5.7.0 vs lib/mihari/service.rb in mihari-5.7.1
- old
+ new
@@ -7,10 +7,20 @@
def call(*args, **kwargs)
raise NotImplementedError, "You must implement #{self.class}##{__method__}"
end
- def result
- Try[StandardError] { call }.to_result
+ def result(...)
+ Try[StandardError] { call(...) }.to_result
+ end
+
+ class << self
+ def call(...)
+ new.call(...)
+ end
+
+ def result(...)
+ new.result(...)
+ end
end
end
end