Module: HasStreak::Streakable::InstanceMethods

Defined in:
lib/has_streak/streakable.rb

Instance Method Summary collapse

Instance Method Details

#streak(association) ⇒ Object



8
9
10
11
12
13
# File 'lib/has_streak/streakable.rb', line 8

def streak(association)
  return if self.send(association).blank?

  days = get_days(association)
  determine_consecutive_days(days)
end