aboutsummaryrefslogtreecommitdiff
path: root/poll.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2011-05-26 15:46:01 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2011-05-26 15:46:01 +0200
commit388ad0a2b2bd88d56cd38a9755ca2c23928c4bdb (patch)
tree026c646ebb86d60baf7a0c2caab9187bf3867a6c /poll.rb
parent94568a50e9bdf631d9594c6794300e280cdce175 (diff)
add possibility to hook into table rendering
Diffstat (limited to 'poll.rb')
-rw-r--r--poll.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/poll.rb b/poll.rb
index 8e19018..dea71a8 100644
--- a/poll.rb
+++ b/poll.rb
@@ -49,6 +49,12 @@ class Poll
YESVAL = "a_yes__"
MAYBEVAL = "b_maybe"
NOVAL = "c_no___"
+
+ @@table_html_hooks = []
+ def Poll.table_html_hooks
+ @@table_html_hooks
+ end
+
def initialize name,type
@name = name
@@ -133,6 +139,8 @@ class Poll
end
}
+ @@table_html_hooks.each{|hook| ret += hook.call(ret)}
+
# PARTICIPATE
ret += participate_to_html unless @data.keys.include?($cgi["edituser"]) || !showparticipation