aboutsummaryrefslogtreecommitdiff
path: root/pollhead.rb
diff options
context:
space:
mode:
Diffstat (limited to 'pollhead.rb')
-rw-r--r--pollhead.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/pollhead.rb b/pollhead.rb
index 524631b..dc2d12d 100644
--- a/pollhead.rb
+++ b/pollhead.rb
@@ -25,13 +25,11 @@ class PollHead
@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{|k,v|
- yield(k)
- }
+ def columns
+ @data.keys.sort
end
# column is in human readable form