class NewsletterReader::Parsers::PrettyGoodWeeklyParser

Constants

Attributes

html_doc[R]

Public Instance Methods

parse(html_doc) click to toggle source
# File lib/newsletter_reader/parsers/pretty_good_weekly_parser.rb, line 10
def parse(html_doc)
  @html_doc = html_doc
  html_doc.css('a').each_with_object([]) do |link, links|
    if actual_link?(link)
      links << Link.new(href: link['href'], content: link.content)
    end
  end.compact
end

Private Instance Methods