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.
9 10 11 12 13 |
# File 'lib/speculation/error.rb', line 9 def initialize(, data) super() @data = data @message = end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/speculation/error.rb', line 7 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/speculation/error.rb', line 7 def @message end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/speculation/error.rb', line 15 def to_s "#{@message} #{PP.pp(@data, String.new)}" end |