Module: AndFeathers::Tarball::ContainsDirectories
- Included in:
- AndFeathers::Tarball, Directory
- Defined in:
- lib/and_feathers/tarball/contains_directories.rb
Overview
A module which gives instances of a class the dir DSL method
Instance Method Summary collapse
-
#dir(name, mode = 16877) {|directory| ... } ⇒ Object
Add a
Directorynamednameto this entity’s list of children.
Instance Method Details
#dir(name, mode = 16877) {|directory| ... } ⇒ Object
Add a Directory named name to this entity’s list of children
15 16 17 18 19 20 21 |
# File 'lib/and_feathers/tarball/contains_directories.rb', line 15 def dir(name, mode = 16877, &block) Directory.new(name, mode, self).tap do |subdir| block.call(subdir) if block @children.push(subdir) end end |