lib/LoomioScraper/activity.rb in LoomioScraper-0.1.0 vs lib/LoomioScraper/activity.rb in LoomioScraper-0.1.1

- old
+ new

@@ -28,11 +28,11 @@ @comment ||= @dom.at_css('.thread-item__body').text.strip end end class Activity < LoomioScraper::Scraper - def initialize(*attr) - super(*attr) + def initialize(url) + super(url) @attributes = %w{ comments } end def comments @comments ||= @dom.css(".activity-card__activity-list li").map { |comment| Comment.new(comment).to_hash } \ No newline at end of file