Class: Cuprum::Cli::Errors::Files::MissingParameter
- Inherits:
-
TemplateError
- Object
- Error
- TemplateError
- Cuprum::Cli::Errors::Files::MissingParameter
- Defined in:
- lib/cuprum/cli/errors/files/missing_parameter.rb
Overview
Error returned when a required parameter is missing when rendering content.
Constant Summary collapse
- TYPE =
Short string used to identify the type of error.
'cuprum.cli.errors.files.missing_parameter'
Instance Attribute Summary collapse
-
#format ⇒ String
readonly
The content format.
-
#parameter_name ⇒ String, Symbol
readonly
The name of the missing parameter.
Attributes inherited from TemplateError
Instance Method Summary collapse
-
#initialize(parameter_name:, details: nil, format: nil, message: nil, template_name: nil) ⇒ MissingParameter
constructor
A new instance of MissingParameter.
Constructor Details
#initialize(parameter_name:, details: nil, format: nil, message: nil, template_name: nil) ⇒ MissingParameter
Returns a new instance of MissingParameter.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/cuprum/cli/errors/files/missing_parameter.rb', line 17 def initialize( parameter_name:, details: nil, format: nil, message: nil, template_name: nil ) @parameter_name = parameter_name @format = format @template_name = template_name super( details:, format:, message: (), parameter_name:, template_name: ) end |
Instance Attribute Details
#format ⇒ String (readonly)
Returns the content format.
38 39 40 |
# File 'lib/cuprum/cli/errors/files/missing_parameter.rb', line 38 def format @format end |
#parameter_name ⇒ String, Symbol (readonly)
Returns the name of the missing parameter.
41 42 43 |
# File 'lib/cuprum/cli/errors/files/missing_parameter.rb', line 41 def parameter_name @parameter_name end |