Exception: Jekyll::Minibundle::VariableTemplate::SyntaxError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Jekyll::Minibundle::VariableTemplate::SyntaxError
- Defined in:
- lib/jekyll/minibundle/variable_template.rb
Constant Summary collapse
- CURSOR =
'@'
Instance Method Summary collapse
-
#initialize(message, template, position) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, template, position) ⇒ SyntaxError
Returns a new instance of SyntaxError.
24 25 26 27 28 29 |
# File 'lib/jekyll/minibundle/variable_template.rb', line 24 def initialize(, template, position) super() @message = @template = template @position = position end |
Instance Method Details
#to_s ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/jekyll/minibundle/variable_template.rb', line 31 def to_s template_before_pos = @template[0, @position] template_after_pos = @template[@position..] <<~MESSAGE #{@message} at position #{@position} in template (position highlighted with "#{CURSOR}"): #{template_before_pos}#{CURSOR}#{template_after_pos} MESSAGE end |