Exception: StaticMatic::AmbiguousTemplateError
- Inherits:
-
StandardError
- Object
- StandardError
- StaticMatic::AmbiguousTemplateError
- Defined in:
- lib/staticmatic/ambiguous_template_error.rb
Instance Attribute Summary collapse
-
#template_name ⇒ Object
readonly
Returns the value of attribute template_name.
Instance Method Summary collapse
-
#initialize(template_name, ambiguous_templates) ⇒ AmbiguousTemplateError
constructor
A new instance of AmbiguousTemplateError.
- #message ⇒ Object
Constructor Details
#initialize(template_name, ambiguous_templates) ⇒ AmbiguousTemplateError
Returns a new instance of AmbiguousTemplateError.
4 5 6 7 |
# File 'lib/staticmatic/ambiguous_template_error.rb', line 4 def initialize(template_name, ambiguous_templates) @template_name = template_name @ambiguous_templates = ambiguous_templates end |
Instance Attribute Details
#template_name ⇒ Object (readonly)
Returns the value of attribute template_name.
2 3 4 |
# File 'lib/staticmatic/ambiguous_template_error.rb', line 2 def template_name @template_name end |
Instance Method Details
#message ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/staticmatic/ambiguous_template_error.rb', line 9 def <<-MESSAGE Ambiguous request when searching for a template for filename `#{@template_name}`: There is more than one type of template available for rendering. Templates causing the ambiguity: #{@ambiguous_templates.join "\n"} MESSAGE end |