Class: SleepingKingStudios::Docs::Errors::FileError

Inherits:
Cuprum::Error
  • Object
show all
Defined in:
lib/sleeping_king_studios/docs/errors/file_error.rb

Overview

Abstract base class for errors interacting with the file system.

Constant Summary collapse

TYPE =

Short string used to identify the type of error.

'sleeping_king_studios.docs.errors.file_error'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message:, path:) ⇒ FileError

Returns a new instance of FileError.

Parameters:

  • message (String)

    message describing the nature of the error.

  • path (String)

    the invalid file or directory path.



15
16
17
18
19
# File 'lib/sleeping_king_studios/docs/errors/file_error.rb', line 15

def initialize(message:, path:)
  super(message:)

  @path = path
end

Instance Attribute Details

#pathString (readonly)

Returns the invalid file or directory path.

Returns:

  • (String)

    the invalid file or directory path.



22
23
24
# File 'lib/sleeping_king_studios/docs/errors/file_error.rb', line 22

def path
  @path
end