class Globs::Glob
Constants
- MATCH_REGEXP
Public Class Methods
new(glob)
click to toggle source
# File lib/globs/glob.rb, line 7 def initialize(glob) @glob = glob end
Public Instance Methods
valid?()
click to toggle source
# File lib/globs/glob.rb, line 11 def valid? return false unless @glob && @glob.kind_of?(String) && @glob != "" return true if Globs::ExtGlob.new(@glob).valid? glob = @glob.dup while(match = MATCH_REGEXP.match(glob)) do return true if match[2] glob.slice!(match.begin(0), match[0].length) end false end