module Upgrow::Action::Decorator
Module to be prepended to subclasses of Action
. This allows Action
to decorate methods implemented by subclasses so they can have additional behaviour.
Public Instance Methods
perform(...)
click to toggle source
Calls the original `perform` method of the Action
object and returns its Result
. In case the Action
throws a `:failure`, catches and returns its value, which is supposed to be a failed Result
generated by the Action
.
@return [Result] the Action
Result
.
Calls superclass method
# File lib/upgrow/action.rb, line 37 def perform(...) catch(:failure) do super result end end