Method: Pathname#glob_relative
- Defined in:
- lib/standard/facets/pathname/glob.rb
#glob_relative(match, *opts) ⇒ Object
Return globbed matches with pathnames relative to the current pathname.
21 22 23 24 25 26 |
# File 'lib/standard/facets/pathname/glob.rb', line 21 def glob_relative(match, *opts) flags = glob_flags(opts) files = Dir.glob(::File.join(self.to_s, match), flags) files = files.map{ |f| f.sub(self.to_s.chomp('/') + '/', '') } files.collect{ |m| self.class.new(m) } end |