Exception: Speculation::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Speculation::Error
- Defined in:
- lib/speculation/error.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, data) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(message, data) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 |
# File 'lib/speculation/error.rb', line 8 def initialize(, data) super() @data = data @message = end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/speculation/error.rb', line 6 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/speculation/error.rb', line 6 def @message end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/speculation/error.rb', line 14 def to_s "#{@message} #{PP.pp(@data, String.new)}" end |