Parent

Methods

Class/Module Index [+]

Quicksearch

Dir

Public Class Methods

[](pattern, flags=0) click to toggle source
Alias for: glob
glob(pattern, flags=0) click to toggle source

Adds a Dir.glob to Ruby 1.8.5, for compat

# File lib/chef/monkey_patches/dir.rb, line 24
def glob(pattern, flags=0)
  raise ArgumentError unless (
    !pattern.nil? and (
      pattern.is_a? Array and !pattern.empty?
    ) or pattern.is_a? String
  )
  pattern.gsub!(/\\/, "/") if RUBY_PLATFORM =~ /mswin|mingw32|windows/
  [pattern].flatten.inject([]) { |r, p| r + glob_(p, flags) }
end
Also aliased as: glob_, []
glob_(pattern, flags=0) click to toggle source
Alias for: glob

[Validate]

Generated with the Darkfish Rdoc Generator 2.