Class: Valise::DirGlob

Inherits:
PathMatcher show all
Defined in:
lib/valise/path-matcher.rb

Instance Attribute Summary

Attributes inherited from PathMatcher

#segment

Instance Method Summary collapse

Methods inherited from PathMatcher

#===, #[], #[]=, build, #each_pair, #merge!, #retreive, #store

Methods included from Unpath

#collapse, #repath, #string_to_segments, #unpath

Constructor Details

#initializeDirGlob

Returns a new instance of DirGlob.



95
96
97
# File 'lib/valise/path-matcher.rb', line 95

def initialize
  super('**')
end

Instance Method Details

#access(segments) ⇒ Object



103
104
105
106
107
108
109
# File 'lib/valise/path-matcher.rb', line 103

def access(segments)
  if segments.empty?
    return nil
  else
    super || access(segments.drop(1))
  end
end

#match?(segment) ⇒ Boolean

Returns:

  • (Boolean)


99
100
101
# File 'lib/valise/path-matcher.rb', line 99

def match?(segment)
  true
end