Method: Thor::Util.thor_root_glob

Defined in:
lib/vendor/thor/lib/thor/util.rb

.thor_root_globObject

Returns the files in the thor root. On Windows thor_root will be something like this:

C:\Documents and Settings\james\.thor

If we don’t #gsub the \ character, Dir.glob will fail.



200
201
202
203
204
205
206
# File 'lib/vendor/thor/lib/thor/util.rb', line 200

def self.thor_root_glob
  files = Dir["#{escape_globs(thor_root)}/*"]

  files.map! do |file|
    File.directory?(file) ? File.join(file, "main.thor") : file
  end
end