Class: UrlFinder::MarkdownReader
- Inherits:
-
BaseReader
- Object
- BaseReader
- UrlFinder::MarkdownReader
- Defined in:
- lib/url_finder/readers/markdown_reader.rb
Overview
Find URLs in Markdown strings
Instance Attribute Summary
Attributes inherited from BaseReader
Instance Method Summary collapse
-
#urls ⇒ Array<String>
Returns the found URLs.
Methods inherited from BaseReader
#each, #empty?, #initialize, #to_a, urls
Constructor Details
This class inherits a constructor from UrlFinder::BaseReader
Instance Method Details
#urls ⇒ Array<String>
Returns the found URLs
12 13 14 15 16 17 |
# File 'lib/url_finder/readers/markdown_reader.rb', line 12 def urls @urls ||= begin html = Kramdown::Document.new(content).to_html HTMLReader.new(html).urls end end |