Module: AndFeathers::Tarball::ContainsFiles
- Included in:
- AndFeathers::Tarball, Directory
- Defined in:
- lib/and_feathers/tarball/contains_files.rb
Overview
A module which gives instances of a class the file DSL method
Constant Summary collapse
- NO_CONTENT =
The default file content block, which returns an empty string
Proc.new { "" }
Instance Method Summary collapse
-
#file(name, mode = 33188, &content) ⇒ Object
Add a
Filenamednameto this entity’s list of children.
Instance Method Details
#file(name, mode = 33188, &content) ⇒ Object
Add a File named name to this entity’s list of children
20 21 22 23 24 |
# 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 |