Exception: Jschematic::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Jschematic::ValidationError
- Defined in:
- lib/jschematic/exceptions.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
readonly
Returns the value of attribute actual.
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#what ⇒ Object
readonly
Returns the value of attribute what.
Instance Method Summary collapse
-
#initialize(what, expected, actual) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(what, expected, actual) ⇒ ValidationError
Returns a new instance of ValidationError.
5 6 7 |
# File 'lib/jschematic/exceptions.rb', line 5 def initialize(what, expected, actual) @what, @expected, @actual = what, expected, actual end |
Instance Attribute Details
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
3 4 5 |
# File 'lib/jschematic/exceptions.rb', line 3 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
3 4 5 |
# File 'lib/jschematic/exceptions.rb', line 3 def expected @expected end |
#what ⇒ Object (readonly)
Returns the value of attribute what.
3 4 5 |
# File 'lib/jschematic/exceptions.rb', line 3 def what @what end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/jschematic/exceptions.rb', line 9 def to_s "#{what} expected #{expected} but found #{actual}" end |