Class: Worktree::Project
- Inherits:
-
Object
- Object
- Worktree::Project
- Defined in:
- lib/worktree/project.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
- #copy_files ⇒ Object
-
#initialize(key) ⇒ Project
constructor
A new instance of Project.
- #root ⇒ Object
Constructor Details
#initialize(key) ⇒ Project
Returns a new instance of Project.
12 13 14 |
# File 'lib/worktree/project.rb', line 12 def initialize(key) @key = key end |
Class Method Details
.resolve(branch, project_dir: nil) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/worktree/project.rb', line 5 def self.resolve(branch, project_dir: nil) project_key = project_key_by_branch(branch) # try to find project key by dir (cherry-pick or open case) project_key = project_key_by_dir(project_dir) if project_key.nil? && project_dir new(project_key) end |