Exception: Optimistic::Json::Parser::MissingParser
- Inherits:
-
StandardError
- Object
- StandardError
- Optimistic::Json::Parser::MissingParser
- Defined in:
- lib/optimistic/json/parser.rb
Overview
Raised when there is no parser for a given token
Instance Method Summary collapse
-
#initialize(tokens:, msg: nil) ⇒ MissingParser
constructor
A new instance of MissingParser.
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 |