Exception: Typstify::MissingTemplate
- Defined in:
- lib/typstify/errors.rb
Overview
The template could not be found as either .typ or .typ.erb.
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
-
#tried ⇒ Object
readonly
Returns the value of attribute tried.
Instance Method Summary collapse
-
#initialize(template, tried) ⇒ MissingTemplate
constructor
A new instance of MissingTemplate.
Constructor Details
#initialize(template, tried) ⇒ MissingTemplate
Returns a new instance of MissingTemplate.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/typstify/errors.rb', line 12 def initialize(template, tried) @template = template @tried = tried super(<<~MSG.strip) Could not find a Typst template for #{template.inspect}. Tried: #{tried.map { |p| " - #{p}" }.join("\n")} Templates live under Typstify.config.template_root (#{Typstify.config.template_root}). MSG end |
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template.
10 11 12 |
# File 'lib/typstify/errors.rb', line 10 def template @template end |
#tried ⇒ Object (readonly)
Returns the value of attribute tried.
10 11 12 |
# File 'lib/typstify/errors.rb', line 10 def tried @tried end |