我该如何清理这个?它读起来很尴尬,而且太长了。
def report_total(feed_event, advisor)
count = 0
advisor.activity_feed_events.each do |lead|
if lead == SignupFeedEvent
count += 1
else
if lead.is_a?(feed_event)
if lead.event_date > (Time.now - 7.days)
count += 1
end
end
end
end
return count
end