class LoomioScraper::Activity

Public Class Methods

new(url) click to toggle source
Calls superclass method LoomioScraper::Scraper::new
# File lib/LoomioScraper/activity.rb, line 33
def initialize(url)
        super(url)
        @attributes = %w{ comments }
end

Public Instance Methods

comments() click to toggle source
# File lib/LoomioScraper/activity.rb, line 38
def comments
        @comments ||= @dom.css(".activity-card__activity-list li").map { |comment| Comment.new(comment).to_hash }
end