Module: URI

Defined in:
lib/ext/uri.rb

Class Method Summary collapse

Class Method Details

.parse_safely(raw_uri) ⇒ Object


2
3
4
5
6
7
8
# File 'lib/ext/uri.rb', line 2

def self.parse_safely(raw_uri)
  begin
    URI.parse raw_uri
  rescue URI::InvalidURIError
    nil
  end
end