Class: Herb::Errors::StrayERBClosingTagError
- Includes:
- Colors
- Defined in:
- lib/herb/errors.rb,
sig/herb/errors.rbs,
ext/herb/error_helpers.c
Constant Summary
Constants included from Colors
Colors::CLEAR_SCREEN, Colors::HIDE_CURSOR, Colors::SHOW_CURSOR
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#inspect ⇒ String
: () -> String.
-
#tree_inspect(indent: 0, depth: 0, depth_limit: 25) ⇒ String
: (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String.
Methods included from Colors
bold, bright_magenta, cyan, dimmed, enabled?, fg, fg_bg, green, magenta, red, #self?.bold, #self?.bright_magenta, #self?.cyan, #self?.dimmed, #self?.enabled?, #self?.fg, #self?.fg_bg, #self?.green, #self?.magenta, #self?.red, #self?.white, #self?.yellow, white, yellow
Methods inherited from Error
#class_name, #error_name, #initialize, #to_hash, #to_json
Constructor Details
This class inherits a constructor from Herb::Errors::Error
Instance Method Details
#inspect ⇒ String
: () -> String
949 950 951 |
# File 'lib/herb/errors.rb', line 949 def inspect tree_inspect.rstrip.gsub(/\s+$/, "") end |
#tree_inspect(indent: 0, depth: 0, depth_limit: 25) ⇒ String
: (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String
954 955 956 957 958 959 960 961 962 |
# File 'lib/herb/errors.rb', line 954 def tree_inspect(indent: 0, depth: 0, depth_limit: 25) output = +"" output += white("@ #{bold(red(error_name))} #{dimmed("(location: #{location&.tree_inspect})\n")}") output += white("└── message: #{green(.inspect)}\n") output += %(\n) output.gsub(/^/, " " * indent) end |