Class: Pathname
- Inherits:
-
Object
- Object
- Pathname
- Defined in:
- lib/senv.rb
Instance Method Summary collapse
Instance Method Details
#glob(glob, &block) ⇒ Object
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
# File 'lib/senv.rb', line 648 def glob(glob, &block) paths = [] Dir.glob("#{ self }/#{ glob }") do |entry| path = Pathname.new(entry) if block block.call(path) else paths.push(path) end end block ? nil : paths end |