Method: Addressable::URI#to_hash

Defined in:
lib/addressable/uri.rb

#to_hashHash

Returns a Hash of the URI components.

Returns:

  • (Hash)

    The URI as a Hash of components.



2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
# File 'lib/addressable/uri.rb', line 2367

def to_hash
  return {
    :scheme => self.scheme,
    :user => self.user,
    :password => self.password,
    :host => self.host,
    :port => self.port,
    :path => self.path,
    :query => self.query,
    :fragment => self.fragment
  }
end