Class: VRundler::Bundles

Inherits:
Object
  • Object
show all
Defined in:
lib/vrundler/bundles.rb

Class Method Summary collapse

Class Method Details

.add(bundle) ⇒ Object Also known as: <<



8
9
10
# File 'lib/vrundler/bundles.rb', line 8

def add(bundle)
  bundles << bundle
end

.bundle_folder(name) ⇒ Object



17
18
19
# File 'lib/vrundler/bundles.rb', line 17

def bundle_folder(name)
  return File.join(bundles_dir, name)
end

.bundlesObject



4
5
6
# File 'lib/vrundler/bundles.rb', line 4

def bundles
  @bundles ||= []
end

.bundles_dir(name = nil) ⇒ Object



13
14
15
# File 'lib/vrundler/bundles.rb', line 13

def bundles_dir(name=nil)
  @name = (name || @name)
end

.each(&block) ⇒ Object



25
26
27
# File 'lib/vrundler/bundles.rb', line 25

def each(&block)
  bundles.each(&block)  
end

.output_folder(bundle) ⇒ Object



21
22
23
# File 'lib/vrundler/bundles.rb', line 21

def output_folder(bundle)
  return bundle_folder(bundle.name)
end

.unpack_all_bundlesObject



29
30
31
32
33
34
# File 'lib/vrundler/bundles.rb', line 29

def unpack_all_bundles
  each do |bundle|
    bundle.delete_existing_folder(File.expand_path(Bundles.bundles_dir))
    bundle.unpack
  end
end