Class: Worktree::Command::Open
- Inherits:
-
Object
- Object
- Worktree::Command::Open
- Defined in:
- lib/worktree/command/open.rb
Overview
:nodoc:
Instance Method Summary collapse
- #do! ⇒ Object
-
#initialize(branch, project_dir:, launcher_vars: {}) ⇒ Open
constructor
A new instance of Open.
Constructor Details
#initialize(branch, project_dir:, launcher_vars: {}) ⇒ Open
Returns a new instance of Open.
6 7 8 9 10 |
# File 'lib/worktree/command/open.rb', line 6 def initialize(branch, project_dir:, launcher_vars: {}) @branch = branch @project_dir = File. project_dir || Project.resolve(branch).root @launcher_vars = launcher_vars end |
Instance Method Details
#do! ⇒ Object
12 13 14 |
# File 'lib/worktree/command/open.rb', line 12 def do! Launcher.new(project_dir: @project_dir, branch: @branch, extra_vars: @launcher_vars).launch! end |