Class: UrlFinder::StringReader

Inherits:
BaseReader show all
Defined in:
lib/url_finder/readers/string_reader.rb

Overview

Find URLs in strings

Instance Attribute Summary

Attributes inherited from BaseReader

#content

Instance Method Summary collapse

Methods inherited from BaseReader

#each, #empty?, #initialize, #to_a, urls

Constructor Details

This class inherits a constructor from UrlFinder::BaseReader

Instance Method Details

#urlsArray<String>

Returns the found URLs

Returns:

  • (Array<String>)

    the found URLs



11
12
13
# File 'lib/url_finder/readers/string_reader.rb', line 11

def urls
  @urls ||= URI.extract(content)
end