def on_success(&block)
      on do |_, value, reason|
        block.call(value) unless reason
      end
    end
def on_success(&block)
      on do |_, value, reason|
        block.call(value) unless reason
      end
    end
command.on_success do |value|
   ...
 end