Sha256: d8c2d019e4813c265780643a033fe8fc4871172afbd49b66cf4c73463503182c

Contents?: true

Size: 305 Bytes

Versions: 4

Compression:

Stored size: 305 Bytes

Contents

# frozen_string_literal: true

require 'uri'
require 'url_finder/readers/base_reader'

module UrlFinder
  # Find URLs in strings
  class StringReader < BaseReader
    # Returns the found URLs
    # @return [Array<String>] the found URLs
    def urls
      @urls ||= URI.extract(content)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
url_finder-0.2.2 lib/url_finder/readers/string_reader.rb
url_finder-0.2.1 lib/url_finder/readers/string_reader.rb
url_finder-0.2.0 lib/url_finder/readers/string_reader.rb
url_finder-0.1.0 lib/url_finder/readers/string_reader.rb