Method: HTTP::Protocol::Reference.parse
- Defined in:
- lib/http/protocol/reference.rb
.parse(path = '/', parameters = nil) ⇒ Object
Generate a reference from a path and user parameters. The path may contain a ‘#fragment` or `?query=parameters`.
41 42 43 44 45 46 |
# File 'lib/http/protocol/reference.rb', line 41 def self.parse(path = '/', parameters = nil) base, fragment = path.split('#', 2) path, query_string = base.split('?', 2) self.new(path, query_string, fragment, parameters) end |