Method: Addressable::URI#site
- Defined in:
- lib/addressable/uri.rb
#site ⇒ String
The combination of components that represent a site. Combines the scheme, user, password, host, and port components. Primarily useful for HTTP and HTTPS.
For example, "http://example.com/path?query" would have a site value of "http://example.com".
1467 1468 1469 1470 1471 1472 1473 1474 |
# File 'lib/addressable/uri.rb', line 1467 def site (self.scheme || self.) && @site ||= begin site_string = "".dup site_string << "#{self.scheme}:" if self.scheme != nil site_string << "//#{self.authority}" if self. != nil site_string end end |