Class: Valise::DirGlob
- Inherits:
-
PathMatcher
- Object
- PathMatcher
- Valise::DirGlob
- Defined in:
- lib/valise/path-matcher.rb
Instance Attribute Summary
Attributes inherited from PathMatcher
Instance Method Summary collapse
- #access(segments) ⇒ Object
-
#initialize ⇒ DirGlob
constructor
A new instance of DirGlob.
- #match?(segment) ⇒ Boolean
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
#initialize ⇒ DirGlob
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
106 107 108 |
# File 'lib/valise/path-matcher.rb', line 106 def match?(segment) true end |