class Addressable::URI

def site

Returns:
  • (String) - The components that identify a site.
def site
  (self.scheme || self.authority) && @site ||= begin
    site_string = "".dup
    site_string << "#{self.scheme}:" if self.scheme != nil
    site_string << "//#{self.authority}" if self.authority != nil
    site_string
  end
end