module UrlFinder

Gem namespace

Constants

VERSION

Gem version

Public Class Methods

from(content, file_format) click to toggle source

Find URLs in string @param [String] content string @param [String] file_format of string (markdown, html, string)

# File lib/url_finder.rb, line 22
def self.from(content, file_format)
  Reader.new(content, file_format).urls
end
from_file(path, file_format = nil) click to toggle source

Find URLs in file @param [String] path to file @param [String] file_format

of file if nil file format will tried to be infered from
file extension (markdown, html, string)
# File lib/url_finder.rb, line 13
def self.from_file(path, file_format = nil)
  file_format ||= path.split('.').last

  from(File.read(path), file_format)
end