# File lib/buildr/java/packaging.rb, line 95 def initialize(arg = nil) case arg when nil, Hash then @sections = [arg || {}] when Array then @sections = arg when String then @sections = Manifest.parse(arg).sections when Proc, Method then @sections = Manifest.new(arg.call).sections else fail 'Invalid manifest, expecting Hash, Array, file name/task or proc/method.' end # Add Manifest-Version and Created-By, if not specified. STANDARD_HEADER.each do |name, value| sections.first[name] ||= value end end