diff options
author | makoto kuwata <kwa@kuwata-lab.com> | 2011-03-20 01:29:52 +0900 |
---|---|---|
committer | makoto kuwata <kwa@kuwata-lab.com> | 2011-03-20 01:29:52 +0900 |
commit | 660ea949afba268fe7bcfc48a336ac03ac94fbe7 (patch) | |
tree | d9132a6be382a21c35a009fcd6834e5f3d7718f2 | |
parent | 66fb830546dbc2a8645df71163561ae92ff8250a (diff) | |
download | erubis-660ea949afba268fe7bcfc48a336ac03ac94fbe7.tar.gz |
[change] 'public_html/index.cgi' to rename 'ERUBY' to '$ERUBIS_CLASS'
-rwxr-xr-x | public_html/index.cgi | 9 |
1 files 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 |