Class: Homecoming::Traversal
- Inherits:
-
Enumerator
- Object
- Enumerator
- Homecoming::Traversal
- Defined in:
- lib/homecoming/traversal.rb
Instance Method Summary collapse
-
#initialize(dir = Dir.pwd, &block) ⇒ Traversal
constructor
A new instance of Traversal.
Constructor Details
#initialize(dir = Dir.pwd, &block) ⇒ Traversal
Returns a new instance of Traversal.
5 6 7 8 9 |
# File 'lib/homecoming/traversal.rb', line 5 def initialize(dir = Dir.pwd, &block) super() do |y| Pathname(dir).ascend { |p| y.yield p.to_s } end end |