class Herb::Errors::TagNamesMismatchError
def initialize(type, location, message, opening_tag, closing_tag)
def initialize(type, location, message, opening_tag, closing_tag) super(type, location, message) @opening_tag = opening_tag @closing_tag = closing_tag end
def inspect
def inspect tree_inspect.rstrip.gsub(/\s+$/, "") end
def to_hash
def to_hash super.merge({ opening_tag: opening_tag, closing_tag: closing_tag, }) 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_tag: #{opening_tag ? opening_tag.tree_inspect : "∅"}\n) output += %(└── closing_tag: #{closing_tag ? closing_tag.tree_inspect : "∅"}\n) output += %(\n) output.gsub(/^/, " " * indent) end