From 660ea949afba268fe7bcfc48a336ac03ac94fbe7 Mon Sep 17 00:00:00 2001 From: makoto kuwata Date: Sun, 20 Mar 2011 01:29:52 +0900 Subject: [change] 'public_html/index.cgi' to rename 'ERUBY' to '$ERUBIS_CLASS' --- public_html/index.cgi | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public_html/index.cgi b/public_html/index.cgi index f38f7fd..ceb8629 100755 --- a/public_html/index.cgi +++ b/public_html/index.cgi @@ -12,6 +12,7 @@ ## configuration $ENCODING = nil $LAYOUT = '_layout.rhtml' +$ERUBIS_CLASS = Erubis::Eruby # or Erubis::EscapeEruby ## load Erubis begin @@ -43,8 +44,6 @@ end class ErubisHandler include Erubis::XmlHelper - ERUBY = Erubis::Eruby # or Erubis::EscapeEruby - def initialize @encoding = $ENCODING @layout = $LAYOUT @@ -68,13 +67,13 @@ class ErubisHandler basepath != env['SCRIPT_NAME'] or # can't access to index.cgi raise HttpError.new(403, "#{basepath}: not accessable.") ## process as eRuby file - #eruby = ERUBY.new(File.read(filepath)) # not create cache file (slower) - eruby = ERUBY.load_file(filepath) # create cache file (faster) + #eruby = $ERUBIS_CLASS.new(File.read(filepath)) # not create cache file (slower) + eruby = $ERUBIS_CLASS.load_file(filepath) # create cache file (faster) html = eruby.evaluate(self) ## use layout template if @layout && File.file?(@layout) @content = html - html = ERUBY.load_file(@layout).evaluate(self) + html = $ERUBIS_CLASS.load_file(@layout).evaluate(self) end return html end -- cgit v1.2.1