Exception: FolderStash::Errors::BranchError

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

Overview

Error that is raises when attempting to create a branch in a folder that can not be branched (typically the terminal).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of BranchError.



11
12
13
14
15
# File 'lib/folder_stash/errors/branch_error.rb', line 11

def initialize(msg = nil, dir: nil)
  @dir = dir
  msg ||= "Can not branch in #{dir} because it is a tree terminal."
  super msg
end

Instance Attribute Details

#dirObject (readonly)

Directory for the folder where the branch was attempted.



9
10
11
# File 'lib/folder_stash/errors/branch_error.rb', line 9

def dir
  @dir
end