Class: ClonePathogen
- Inherits:
-
Object
- Object
- ClonePathogen
- Defined in:
- lib/vpm/tasks/clone_pathogen.rb
Instance Method Summary collapse
-
#initialize(base_dir) ⇒ ClonePathogen
constructor
A new instance of ClonePathogen.
- #perform ⇒ Object
- #undo ⇒ Object
Constructor Details
#initialize(base_dir) ⇒ ClonePathogen
Returns a new instance of ClonePathogen.
2 3 4 |
# File 'lib/vpm/tasks/clone_pathogen.rb', line 2 def initialize(base_dir) @destination = File.join(base_dir, 'pathogen') end |
Instance Method Details
#perform ⇒ Object
6 7 8 |
# File 'lib/vpm/tasks/clone_pathogen.rb', line 6 def perform Kernel.system "git clone https://github.com/tpope/vim-pathogen.git #{@destination}" end |
#undo ⇒ Object
10 11 12 |
# File 'lib/vpm/tasks/clone_pathogen.rb', line 10 def undo FileUtils.rm_r @destination end |