Class: Cuprum::Cli::Errors::Files::MissingTemplate

Inherits:
Error
  • Object
show all
Defined in:
lib/cuprum/cli/errors/files/missing_template.rb

Overview

Error returned when unable to load a template.

Constant Summary collapse

TYPE =

Short string used to identify the type of error.

'cuprum.cli.errors.files.missing_template'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template_path:, message: nil) ⇒ MissingTemplate

Returns a new instance of MissingTemplate.

Parameters:

  • template_path (String)

    the expected template path.

  • message (String) (defaults to: nil)

    an optional message to display.



15
16
17
18
19
# File 'lib/cuprum/cli/errors/files/missing_template.rb', line 15

def initialize(template_path:, message: nil)
  @template_path = template_path

  super(message: default_message(message), template_path:)
end

Instance Attribute Details

#template_pathString (readonly)

Returns the expected template path.

Returns:

  • (String)

    the expected template path.



22
23
24
# File 'lib/cuprum/cli/errors/files/missing_template.rb', line 22

def template_path
  @template_path
end