Exception: Optimistic::Json::Parser::MissingParser

Inherits:
StandardError
  • Object
show all
Defined in:
lib/optimistic/json/parser.rb

Overview

Raised when there is no parser for a given token

Instance Method Summary collapse

Constructor Details

#initialize(tokens:, msg: nil) ⇒ MissingParser

Returns a new instance of MissingParser.



14
15
16
17
# File 'lib/optimistic/json/parser.rb', line 14

def initialize(tokens:, msg: nil)
  super(msg || "No registered parser for `#{tokens[0]}`: #{tokens}")
  @tokens = tokens
end