Exception: FolderStash::Errors::BranchError
- Inherits:
-
StandardError
- Object
- StandardError
- FolderStash::Errors::BranchError
- 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
-
#dir ⇒ Object
readonly
Directory for the folder where the branch was attempted.
Instance Method Summary collapse
-
#initialize(msg = nil, dir: nil) ⇒ BranchError
constructor
A new instance of BranchError.
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
#dir ⇒ Object (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 |