Class: Protocol::Content::Parameters::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/protocol/content/parameters/error.rb

Overview

A validation error associated with a specific argument path.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

The machine-readable error code.



27
28
29
# File 'lib/protocol/content/parameters/error.rb', line 27

def code
  @code
end

#detailsObject (readonly)

Additional error details.



30
31
32
# File 'lib/protocol/content/parameters/error.rb', line 30

def details
  @details
end

#pathObject (readonly)

The path to the invalid argument.



24
25
26
# File 'lib/protocol/content/parameters/error.rb', line 24

def path
  @path
end