Exception: Flows::Contract::Error
- Defined in:
- lib/flows/contract/error.rb
Overview
Class for Type errors.
Instance Attribute Summary collapse
- #value ⇒ Object readonly
- #value_error ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(value, value_error) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
Constructor Details
#initialize(value, value_error) ⇒ Error
Returns a new instance of Error.
9 10 11 12 |
# File 'lib/flows/contract/error.rb', line 9 def initialize(value, value_error) @value = value @value_error = value_error end |
Instance Attribute Details
#value ⇒ Object (readonly)
5 6 7 |
# File 'lib/flows/contract/error.rb', line 5 def value @value end |
#value_error ⇒ Object (readonly)
5 6 7 |
# File 'lib/flows/contract/error.rb', line 5 def value_error @value_error end |
Instance Method Details
#message ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/flows/contract/error.rb', line 14 def [ 'type check failed for:', " `#{@value.inspect}`", "---\n", @value_error ].join("\n") end |