Module: VRundler::BasicBundle

Included in:
Bundle, SymlinkBundle, VimScriptBundle, VimZipBundle
Defined in:
lib/vrundler/basic_bundle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#completion_blockObject (readonly)

Returns the value of attribute completion_block.



3
4
5
# File 'lib/vrundler/basic_bundle.rb', line 3

def completion_block
  @completion_block
end

Instance Method Details

#after_download(&block) ⇒ Object



15
16
17
# File 'lib/vrundler/basic_bundle.rb', line 15

def after_download(&block)
  @completion_block = block
end

#delete_existing_folder(path) ⇒ Object



10
11
12
13
# File 'lib/vrundler/basic_bundle.rb', line 10

def delete_existing_folder(path)
  folder = File.join(path, name.to_s)
  FileUtils.rm_rf folder unless dont_delete
end

#dont_delete(value = nil) ⇒ Object



5
6
7
8
# File 'lib/vrundler/basic_bundle.rb', line 5

def dont_delete(value=nil)
  @dont_delete ||= false
  @dont_delete = value || @dont_delete
end

#run_extraObject



19
20
21
# File 'lib/vrundler/basic_bundle.rb', line 19

def run_extra
  completion_block.call if completion_block
end

#unpackObject



23
24
25
26
# File 'lib/vrundler/basic_bundle.rb', line 23

def unpack
  bundle_specific_unpack
  run_extra
end