Method: Addressable::URI#ip_based?

Defined in:
lib/addressable/uri.rb

#ip_based?TrueClass, FalseClass

Determines if the scheme indicates an IP-based protocol.

Returns:

  • (TrueClass, FalseClass)

    true if the scheme indicates an IP-based protocol. false otherwise.



1855
1856
1857
1858
1859
1860
1861
# File 'lib/addressable/uri.rb', line 1855

def ip_based?
  if self.scheme
    return URI.ip_based_schemes.include?(
      self.scheme.strip.downcase)
  end
  return false
end