Class: URI::Generic
Instance Method Summary collapse
- #<(oth) ⇒ Object
-
#<=(oth) ⇒ Object
Returns true if this URI is the same or less specific than
othURI. - #>(oth) ⇒ Object
-
#>=(oth) ⇒ Object
Returns true if
othURI is the same or less specific than itself. - #params ⇒ Object
Instance Method Details
#<(oth) ⇒ Object
22 |
# File 'lib/cnc/core_ext/uri.rb', line 22 def <(oth) = URI(oth) >= self |
#<=(oth) ⇒ Object
Returns true if this URI is the same or less specific than oth URI.
10 11 12 13 |
# File 'lib/cnc/core_ext/uri.rb', line 10 def <=(oth) oth = URI(oth) oth.path.start_with?(path) && params <= oth.params end |
#>(oth) ⇒ Object
21 |
# File 'lib/cnc/core_ext/uri.rb', line 21 def >(oth) = URI(oth) <= self |
#>=(oth) ⇒ Object
Returns true if oth URI is the same or less specific than itself.
16 17 18 19 |
# File 'lib/cnc/core_ext/uri.rb', line 16 def >=(oth) oth = URI(oth) path.start_with?(oth.path) && params >= oth.params end |
#params ⇒ Object
5 6 7 |
# File 'lib/cnc/core_ext/uri.rb', line 5 def params Rack::Utils.parse_query(query) end |