Method: ChocTop::Configuration#file

Defined in:
lib/choctop.rb

#file(*args, &block) ⇒ Object Also known as: add_file

Add an explicit file/bundle/folder into the DMG Examples:

file 'build/Release/SampleApp.app', :position => [50, 100]
file :target_bundle, :position => [50, 100]
file proc { 'README.txt' }, :position => [50, 100]
file :position => [50, 100] { 'README.txt' }

Required option:

+:position+ - two item array [x, y] window position

Options:

+:name+    - override the name of the project when mounted in the DMG
+:exclude+ - do not include files/folders


255
256
257
258
259
260
# File 'lib/choctop.rb', line 255

def file(*args, &block)
  path_or_helper, options = args.first.is_a?(Hash) ? [block, args.first] : [args.first, args.last]
  throw "add_files #{path_or_helper}, :position => [x,y] option is missing" unless options[:position]
  self.files ||= {}
  files[path_or_helper] = options
end