Class: Dir

Inherits:
Object show all
Defined in:
lib/chef.rb

Class Method Summary collapse

Class Method Details

.glob(pattern, flags = 0) ⇒ Object Also known as: []

Raises:

  • (ArgumentError)


38
39
40
41
42
43
44
45
# File 'lib/chef.rb', line 38

def glob(pattern, flags=0)
  raise ArgumentError unless (
    !pattern.nil? and (
      pattern.is_a? Array and !pattern.empty?
    ) or pattern.is_a? String
  )
  [pattern].flatten.inject([]) { |r, p| r + glob_(p, flags) }
end

.glob_Object



37
# File 'lib/chef.rb', line 37

alias_method :glob_, :glob