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 =
'@'.freeze
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.
20 21 22 23 24 |
# File 'lib/jekyll/minibundle/variable_template.rb', line 20 def initialize(, template, position) @message = @template = template @position = position end |
Instance Method Details
#to_s ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/jekyll/minibundle/variable_template.rb', line 26 def to_s template_before_pos = @template[0, @position] template_after_pos = @template[@position..-1] <<-END #{@message} at position #{@position} in template (position highlighted with "#{CURSOR}"): #{template_before_pos}#{CURSOR}#{template_after_pos} END end |