module AndFeathers::Tarball::ContainsFiles

A module which gives instances of a class the file DSL method

Constants

NO_CONTENT

The default file content block, which returns an empty string

Public Instance Methods

file(name, mode = 33188, &content) click to toggle source

Add a File named name to this entity’s list of children

@param name [String] the file name @param mode [Fixnum] the file mode

@yieldreturn [String] the file contents

# File lib/and_feathers/tarball/contains_files.rb, line 20
def file(name, mode = 33188, &content)
  content ||= NO_CONTENT

  @children.push(File.new(name, mode, content, self))
end