class Engagement::CommentCounter
Public Class Methods
new(places)
click to toggle source
# File lib/engagement/comment_counter.rb, line 10 def initialize(places) @places = places end
Public Instance Methods
comments_count(url)
click to toggle source
# File lib/engagement/comment_counter.rb, line 14 def comments_count(url) @places.inject(0) do |comments_count, place| comments_count + place.comments_count(url) end end