Module: StatsHelper

Defined in:
app/helpers/stats_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) array_of_month_and_year_labels(count)



11
12
13
# File 'app/helpers/stats_helper.rb', line 11

def array_of_month_and_year_labels(count)
  Array.new(count) { |i| month_and_year_label(i) }
end

- (Object) array_of_month_labels(count)



19
20
21
# File 'app/helpers/stats_helper.rb', line 19

def array_of_month_labels(count)
  Array.new(count) { |i| month_label(i) }
end

- (Object) font_size(cloud, tag)



3
4
5
# File 'app/helpers/stats_helper.rb', line 3

def font_size(cloud, tag)
  9 + 2 * cloud.relative_size(tag)
end

- (Object) month_and_year_label(i)



7
8
9
# File 'app/helpers/stats_helper.rb', line 7

def month_and_year_label(i)
  t('date.month_names')[ (Time.now.mon - i -1 ) % 12 + 1 ]+ " " + (Time.now - i.months).year.to_s
end

- (Object) month_label(i)



15
16
17
# File 'app/helpers/stats_helper.rb', line 15

def month_label(i)
  t('date.month_names')[ (Time.now.mon - i -1 ) % 12 + 1 ]
end