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, #each_pair, #merge!, #retreive, #store

Methods included from Unpath

#collapse, file_from_backtrace, #file_from_backtrace, #from_here, from_here, repath, string_to_segments, unpath, up_to, #up_to

Constructor Details

#initializeDirGlob

Returns a new instance of DirGlob.



102
103
104
# File 'lib/valise/path-matcher.rb', line 102

def initialize
  super('**')
end

Instance Method Details

#access(segments) ⇒ Object



110
111
112
113
114
115
116
# File 'lib/valise/path-matcher.rb', line 110

def access(segments)
  if segments.empty?
    return @value
  else
    retreive(segments) || access(segments.drop(1))
  end
end

#match?(segment) ⇒ Boolean

Returns:

  • (Boolean)


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

def match?(segment)
  true
end