Class: Jake::Package
Instance Attribute Summary
Attributes inherited from Buildable
Instance Method Summary collapse
Methods inherited from Buildable
#build_needed?, #build_path, #directory, #header, #initialize, #meta, #packer_settings, #parent, #write!
Constructor Details
This class inherits a constructor from Jake::Buildable
Instance Method Details
#code(build_name, with_header = true) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/jake/package.rb', line 16 def code(build_name, with_header = true) if cached = @code[build_name] return with_header ? cached : cached.code end packer = packer_settings(build_name) head = header head = head && head.strip unless packer[:minify] == false packer = packer.merge(:header => head) code = code_for_packer(packer, build_name) cached = @code[build_name] = code with_header ? code : code.code end |