Module: Micky::URI

Defined in:
lib/micky/uri.rb

Class Method Summary collapse

Class Method Details

.extract(text) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/micky/uri.rb', line 25

def self.extract(text)
  ::URI.extract(text).select { |uri|
    begin
      ::URI.parse(uri).is_a? ::URI::HTTP
    rescue ::URI::InvalidURIError
      false
    end
  }
end