Sha256: 6b10cafea105058f09428afbdb360a44f12aad44827b5052a84fcbbf357c9364

Contents?: true

Size: 310 Bytes

Versions: 23

Compression:

Stored size: 310 Bytes

Contents

module HistoricalWeeklyStats

  def history_range
    @history_range ||= ((weeks_of_history - 1).weeks.before(this_week.begin))..this_week.end
  end

  def history_weeks
    @history_weeks ||= history_range.step(7)
  end

  def new_history_vector
    Hash[history_weeks.zip([0] * weeks_of_history)]
  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
houston-core-0.8.4 app/concerns/historical_weekly_stats.rb
houston-core-0.8.3 app/concerns/historical_weekly_stats.rb
houston-core-0.8.2 app/concerns/historical_weekly_stats.rb
houston-core-0.8.1 app/concerns/historical_weekly_stats.rb
houston-core-0.8.0 app/concerns/historical_weekly_stats.rb
houston-core-0.8.0.pre2 app/concerns/historical_weekly_stats.rb
houston-core-0.8.0.pre app/concerns/historical_weekly_stats.rb
houston-core-0.7.0 app/concerns/historical_weekly_stats.rb
houston-core-0.7.0.beta4 app/concerns/historical_weekly_stats.rb
houston-core-0.7.0.beta3 app/concerns/historical_weekly_stats.rb
houston-core-0.7.0.beta2 app/concerns/historical_weekly_stats.rb
houston-core-0.7.0.beta app/concerns/historical_weekly_stats.rb
houston-core-0.6.3 app/concerns/historical_weekly_stats.rb
houston-core-0.6.2 app/concerns/historical_weekly_stats.rb
houston-core-0.6.1 app/concerns/historical_weekly_stats.rb
houston-core-0.6.0 app/concerns/historical_weekly_stats.rb
houston-core-0.5.6 app/concerns/historical_weekly_stats.rb
houston-core-0.5.5 app/concerns/historical_weekly_stats.rb
houston-core-0.5.4 app/concerns/historical_weekly_stats.rb
houston-core-0.5.3 app/concerns/historical_weekly_stats.rb