class Herb::Errors::QuotesMismatchError
def initialize(type, location, message, opening_quote, closing_quote)
def initialize(type, location, message, opening_quote, closing_quote) super(type, location, message) @opening_quote = opening_quote @closing_quote = closing_quote end
def inspect
def inspect tree_inspect.rstrip.gsub(/\s+$/, "") end
def to_hash
def to_hash super.merge({ opening_quote: opening_quote, closing_quote: closing_quote, }) end
def tree_inspect(indent = 0)
def tree_inspect(indent = 0) output = +"" output += %(@ #{error_name} #{location.tree_inspect}\n) output += %(├── message: #{message.inspect}\n) output += %(├── opening_quote: #{opening_quote ? opening_quote.tree_inspect : "∅"}\n) output += %(└── closing_quote: #{closing_quote ? closing_quote.tree_inspect : "∅"}\n) output += %(\n) output.gsub(/^/, " " * indent) end