Module: WithStats

Included in:
Chapter, Guide
Defined in:
app/models/with_stats.rb

Instance Method Summary collapse

Instance Method Details

#started?(user) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'app/models/with_stats.rb', line 7

def started?(user)
  stats_for(user).started?
end

#stats_for(user) ⇒ Object



2
3
4
5
# File 'app/models/with_stats.rb', line 2

def stats_for(user)
  return unless user.present?
  Stats.from_statuses statuses_for(user)
end