Module: URI

Defined in:
lib/core-extensions/uri_ext.rb

Class Method Summary collapse

Class Method Details

.valid?(uri) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
# File 'lib/core-extensions/uri_ext.rb', line 4

def self.valid?(uri)
  parse(uri)
rescue URI::InvalidURIError
  false
end