Class: Katello::Util::UrlMatcher::Pattern
- Inherits:
-
Path
- Object
- Path
- Katello::Util::UrlMatcher::Pattern
show all
- Defined in:
- app/lib/katello/util/url_matcher.rb
Instance Attribute Summary
Attributes inherited from Path
#ext, #parts
Instance Method Summary
collapse
Methods inherited from Path
#initialize, #to_s
Instance Method Details
#==(other) ⇒ Object
71
72
73
74
75
|
# File 'app/lib/katello/util/url_matcher.rb', line 71
def ==(other)
is_match = size_match?(other) && ext_match?(other) && static_match?(other)
@match = other if is_match
is_match
end
|
#variables ⇒ Object
Also known as:
vars
59
60
61
62
63
64
65
66
67
68
|
# File 'app/lib/katello/util/url_matcher.rb', line 59
def variables
return [] unless @match
a = []
self.parts.each_with_index do |part, i|
a << @match.parts[i] if part[0] == ':'
end
a << @match.ext[1..-1] if self.ext[1] == ':'
a
end
|