class Liquid::Error
Attributes
line_number[RW]
markup_context[RW]
template_name[RW]
Public Instance Methods
to_s(with_prefix = true)
click to toggle source
Calls superclass method
# File lib/liquid/errors.rb, line 7 def to_s(with_prefix = true) str = "" str << message_prefix if with_prefix str << super() if markup_context str << " " str << markup_context end str end
Private Instance Methods
message_prefix()
click to toggle source
# File lib/liquid/errors.rb, line 22 def message_prefix str = "" if is_a?(SyntaxError) str << "Liquid syntax error" else str << "Liquid error" end if line_number str << " (" str << template_name << " " if template_name str << "line " << line_number.to_s << ")" end str << ": " str end