From 6ff1f342c6ac1f3c9c1c31fb050af3fda0850d2d Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Fri, 12 Feb 2010 22:37:05 +0100 Subject: add possibility to add javascript (no file) --- html.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'html.rb') diff --git a/html.rb b/html.rb index 57f69a6..b555eb0 100644 --- a/html.rb +++ b/html.rb @@ -78,9 +78,18 @@ HEAD def add_head_script(file) add_html_head("") end - def add_script(file) + def add_script_file(file) self << "" end + def add_script(script) + self << < +SCRIPT + end def << (bodycontent) @body += bodycontent.chomp + "\n" end -- cgit v1.2.3