Class: Cuprum::Cli::Errors::Files::FileNotWriteable
- Inherits:
-
Error
- Object
- Error
- Cuprum::Cli::Errors::Files::FileNotWriteable
- Defined in:
- lib/cuprum/cli/errors/files/file_not_writeable.rb
Overview
Error returned when attempting to generate a file in an invalid location.
Constant Summary collapse
- TYPE =
Short string used to identify the type of error.
'cuprum.cli.errors.files.file_not_writeable'
Instance Attribute Summary collapse
-
#file_path ⇒ String
readonly
The path to the expected file.
-
#reason ⇒ String
readonly
Additional details on the error.
Instance Method Summary collapse
-
#initialize(file_path:, message: nil, reason: nil) ⇒ FileNotWriteable
constructor
A new instance of FileNotWriteable.
Constructor Details
#initialize(file_path:, message: nil, reason: nil) ⇒ FileNotWriteable
Returns a new instance of FileNotWriteable.
16 17 18 19 20 21 22 |
# File 'lib/cuprum/cli/errors/files/file_not_writeable.rb', line 16 def initialize(file_path:, message: nil, reason: nil) @file_path = file_path @reason = reason = (file_path:, message:, reason:) super end |
Instance Attribute Details
#file_path ⇒ String (readonly)
Returns the path to the expected file.
25 26 27 |
# File 'lib/cuprum/cli/errors/files/file_not_writeable.rb', line 25 def file_path @file_path end |
#reason ⇒ String (readonly)
Returns additional details on the error.
28 29 30 |
# File 'lib/cuprum/cli/errors/files/file_not_writeable.rb', line 28 def reason @reason end |