Exception: TypedParams::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/typed_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, path: nil) ⇒ ValidationError

Returns a new instance of ValidationError.



71
72
73
74
75
# File 'lib/typed_params.rb', line 71

def initialize(message, path: nil)
  @path = path

  super(message)
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



69
70
71
# File 'lib/typed_params.rb', line 69

def path
  @path
end

Instance Method Details

#inspectObject



77
78
79
# File 'lib/typed_params.rb', line 77

def inspect
  "#<#{self.class.name} message=#{message.inspect} path=#{path.inspect}>"
end