From abdcb2de223214b10e84e4e69d67dc87e5b60aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 16 Jan 2012 14:22:30 +0100 Subject: Node static!=> static_page!, compile!=>compile_page! --- lib/zorglub/node.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index 7f81c2e..a9e4874 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -130,9 +130,9 @@ module Zorglub @content = self.send @options[:method], *@options[:args] static_path = static if static_path.nil? - compile! + compile_page! else - static! static_path + static_page! static_path end state :post_cb Node.call_after_hooks self @@ -140,9 +140,9 @@ module Zorglub return @content, @mime end # - def static! path + def static_page! path if not File.exists? path - compile! + compile_page! Dir.mkdir Config.static_base_path Dir.mkdir File.dirname path File.open(path, 'w') {|f| f.write("@mime:"+@mime+"\n"); f.write(@content); } @@ -155,7 +155,7 @@ module Zorglub end end # - def compile! + def compile_page! e, @options[:ext] = Config.engine_proc_ext @options[:engine], @options[:ext] v, l = view, layout if Config.debug -- cgit v1.1-2-g2b99