lib/muina/action/step/command.rb in muina-0.2.7 vs lib/muina/action/step/command.rb in muina-0.2.8
- old
+ new
@@ -4,16 +4,18 @@
module Muina
class Action
class Step < Value
# Commands are meant to run code with side effects and return no value.
class Command < self
- def call(action = Object.new)
+ def call(action = Object.new) # rubocop:disable Metrics/MethodLength
return if action.instance_variable_get(:@__failure__)
case result = Muina::Result() { action.instance_eval(&step) }
when Muina::Result::Success then success
when Muina::Result::Failure then failure(action, result)
- else nil
+ # :nocov:
+ else T.absurd(result)
+ # :nocov:
end
end
private