From 7a54fadf7f03d029f1bdec1381d6fde00ed4f886 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Thu, 7 Jan 2010 09:39:37 +0100 Subject: each_column -> column.each --- timepollhead.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'timepollhead.rb') diff --git a/timepollhead.rb b/timepollhead.rb index b1e45d3..f0731ae 100644 --- a/timepollhead.rb +++ b/timepollhead.rb @@ -93,13 +93,11 @@ class TimePollHead @data.size end - # iterates over each column + # returns a sorted array of all columns # column should be the internal representation # column.to_s should deliver humanreadable form - def each_column - @data.sort.each{|day| - yield(day.to_s) - } + def columns + @data.sort.each.collect{|day| day.to_s} end def each_time -- cgit v1.2.3