class MightyJSON::UnexpectedFieldError

Attributes

path[R]
value[R]

Public Class Methods

new(path: , value:) click to toggle source
# File lib/mighty_json/errors.rb, line 36
def initialize(path: , value:)
  @path = path
  @value = value
end

Public Instance Methods

message()
Alias for: to_s
to_s() click to toggle source
# File lib/mighty_json/errors.rb, line 41
def to_s
  position = "#{path.join('.')}"
  "Unexpected field of #{position} (#{value})"
end
Also aliased as: message