Class: Jake::Bundle

Inherits:
Buildable show all
Defined in:
lib/jake/bundle.rb

Instance Attribute Summary

Attributes inherited from Buildable

#name

Instance Method Summary collapse

Methods inherited from Buildable

#build_needed?, #build_path, #directory, #header, #initialize, #packer_settings, #parent, #write!

Constructor Details

This class inherits a constructor from Jake::Buildable

Instance Method Details

#code(name) ⇒ Object



13
14
15
16
# File 'lib/jake/bundle.rb', line 13

def code(name)
  joiner = (packer_settings(name) == false) ? "\n\n\n" : "\n"
  @code[name] ||= @config[:files].map { |pkg| @build.package(pkg).code(name) }.join(joiner)
end

#filesObject



4
5
6
7
# File 'lib/jake/bundle.rb', line 4

def files
  base = parent ? parent.files : []
  base + @config[:files].map { |pkg| @build.package(pkg).files }.flatten
end

#sourceObject



9
10
11
# File 'lib/jake/bundle.rb', line 9

def source
  @source ||= @config[:files].map { |pkg| @build.package(pkg).source }.join("\n\n\n")
end