Class: Worktree::Feature::CopyFiles
- Inherits:
-
Object
- Object
- Worktree::Feature::CopyFiles
- Defined in:
- lib/worktree/feature/copy_files.rb
Instance Method Summary collapse
-
#initialize(project_dir:, branch:) ⇒ CopyFiles
constructor
A new instance of CopyFiles.
- #run! ⇒ Object
Constructor Details
#initialize(project_dir:, branch:) ⇒ CopyFiles
Returns a new instance of CopyFiles.
9 10 11 12 |
# File 'lib/worktree/feature/copy_files.rb', line 9 def initialize(project_dir:, branch:) @project_dir = project_dir @branch = branch end |
Instance Method Details
#run! ⇒ Object
14 15 16 |
# File 'lib/worktree/feature/copy_files.rb', line 14 def run! files_to_copy.each { |path| copy_file(path) } end |