aboutsummaryrefslogtreecommitdiff
path: root/timepollhead.rb
diff options
context:
space:
mode:
Diffstat (limited to 'timepollhead.rb')
-rw-r--r--timepollhead.rb8
1 files changed, 3 insertions, 5 deletions
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