class Pandocomatic::TemplateError
Public Class Methods
new(type = :unknown, data = nil)
click to toggle source
Create a new PandocomaticError
@param type [Symbol = :unknown] the type of error, defaults to :unknown @param data [Object = nil] extra information attached to this
TemplateError, if any; optional
Calls superclass method
Pandocomatic::PandocomaticError::new
# File lib/pandocomatic/error/template_error.rb, line 31 def initialize(type = :unknown, data = nil) super(type, nil, data) end
Public Instance Methods
template()
click to toggle source
The template to print this TemplateError
# File lib/pandocomatic/error/template_error.rb, line 44 def template 'template_error.txt' end
to_s()
click to toggle source
Represent this template error as a string. @return [String]
# File lib/pandocomatic/error/template_error.rb, line 37 def to_s "Environment variable '#{@data[:key]}'" \ "#{" in '#{@data[:path]}'" unless @data[:path].nil?} " \ 'does not exist: No substitution possible.' end