Exception: FolderStash::Errors::NoDirectoryError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/folder_stash/errors/no_directory_error.rb

Overview

Error that is raised if a directory does not exist.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, dir: nil) ⇒ NoDirectoryError

Returns a new instance of NoDirectoryError.



10
11
12
13
14
# File 'lib/folder_stash/errors/no_directory_error.rb', line 10

def initialize(msg = nil, dir: nil)
  @dir = dir
  msg ||= "The directory #{dir} does not exist or is not a directory"
  super msg
end

Instance Attribute Details

#dirObject (readonly)

Path for the directory that does not exist.



8
9
10
# File 'lib/folder_stash/errors/no_directory_error.rb', line 8

def dir
  @dir
end