Class: RaaP::Result::Failure

Inherits:
Object
  • Object
show all
Includes:
ReturnValueWithType
Defined in:
lib/raap/result.rb

Instance Method Summary collapse

Methods included from ReturnValueWithType

#return_value_with_type

Constructor Details

#initialize(exception: nil) ⇒ Failure

Returns a new instance of Failure.



77
78
79
# File 'lib/raap/result.rb', line 77

def initialize(exception: nil, **)
  super
end

Instance Method Details

#called_strObject



81
82
83
84
85
86
87
88
89
90
# File 'lib/raap/result.rb', line 81

def called_str
  scr = SymbolicCaller.new(symbolic_call)
  return_type =
    if exception
      "raised #{exception.class}"
    else
      return_value_with_type
    end
  "#{scr.call_str} -> #{return_type}"
end