Class: Protocol::Content::Parameters::Error
- Inherits:
-
Object
- Object
- Protocol::Content::Parameters::Error
- Defined in:
- lib/protocol/content/parameters/error.rb
Overview
A validation error associated with a specific argument path.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
The machine-readable error code.
-
#details ⇒ Object
readonly
Additional error details.
-
#path ⇒ Object
readonly
The path to the invalid argument.
Instance Method Summary collapse
-
#initialize(path, code, **details) ⇒ Error
constructor
Initialize the validation error.
Constructor Details
#initialize(path, code, **details) ⇒ Error
Initialize the validation error.
17 18 19 20 21 |
# File 'lib/protocol/content/parameters/error.rb', line 17 def initialize(path, code, **details) @path = path @code = code @details = details.freeze end |
Instance Attribute Details
#code ⇒ Object (readonly)
The machine-readable error code.
27 28 29 |
# File 'lib/protocol/content/parameters/error.rb', line 27 def code @code end |
#details ⇒ Object (readonly)
Additional error details.
30 31 32 |
# File 'lib/protocol/content/parameters/error.rb', line 30 def details @details end |
#path ⇒ Object (readonly)
The path to the invalid argument.
24 25 26 |
# File 'lib/protocol/content/parameters/error.rb', line 24 def path @path end |