Module: Micky::URI

Defined in:
lib/micky/uri.rb

Class Method Summary collapse

Class Method Details

.extract(text) ⇒ Object



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

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