Class: Evilution::Result::ErrorInfo Private
- Inherits:
-
Object
- Object
- Evilution::Result::ErrorInfo
- Defined in:
- lib/evilution/result/error_info.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #backtrace ⇒ Object readonly private
- #klass ⇒ Object readonly private
- #message ⇒ Object readonly private
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message: nil, klass: nil, backtrace: nil) ⇒ ErrorInfo
constructor
private
A new instance of ErrorInfo.
Constructor Details
#initialize(message: nil, klass: nil, backtrace: nil) ⇒ ErrorInfo
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ErrorInfo.
14 15 16 17 18 19 |
# File 'lib/evilution/result/error_info.rb', line 14 def initialize(message: nil, klass: nil, backtrace: nil) @message = @klass = klass @backtrace = backtrace.nil? ? nil : backtrace.dup.freeze freeze end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 |
# File 'lib/evilution/result/error_info.rb', line 6 def backtrace @backtrace end |
#klass ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 |
# File 'lib/evilution/result/error_info.rb', line 6 def klass @klass end |
#message ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 |
# File 'lib/evilution/result/error_info.rb', line 6 def @message end |
Class Method Details
.from_fields(message: nil, klass: nil, backtrace: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 |
# File 'lib/evilution/result/error_info.rb', line 8 def self.from_fields(message: nil, klass: nil, backtrace: nil) return nil if .nil? && klass.nil? && backtrace.nil? new(message: , klass: klass, backtrace: backtrace) end |