Exception: Natsuzora::Contract::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Natsuzora::Contract::ValidationError
- Defined in:
- lib/natsuzora/contract/validator.rb
Overview
Error that can occur during validation.
Instance Attribute Summary collapse
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(message, path = '$') ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(message, path = '$') ⇒ ValidationError
Returns a new instance of ValidationError.
18 19 20 21 22 |
# File 'lib/natsuzora/contract/validator.rb', line 18 def initialize(, path = '$') @path = path @error_message = super("#{} at #{path}") end |
Instance Attribute Details
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
16 17 18 |
# File 'lib/natsuzora/contract/validator.rb', line 16 def @error_message end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
16 17 18 |
# File 'lib/natsuzora/contract/validator.rb', line 16 def path @path end |