diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-16 14:22:30 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-16 14:22:30 +0100 |
commit | abdcb2de223214b10e84e4e69d67dc87e5b60aec (patch) | |
tree | ab32d320e96f6a55e75e771d3d03356b6c377196 | |
parent | cddb168e3188a0d4c04f900898f77ad9584c2f4e (diff) | |
download | zorglub-abdcb2de223214b10e84e4e69d67dc87e5b60aec.zip zorglub-abdcb2de223214b10e84e4e69d67dc87e5b60aec.tar.gz |
Node static!=> static_page!, compile!=>compile_page!
-rw-r--r-- | lib/zorglub/node.rb | 10 |
1 files 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 |