summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-04 09:42:22 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-04 09:42:22 +0100
commit626aebd32b2fa899cfb67f3b569c7460aee9c9b0 (patch)
tree26462a379c12db6b7420cd3e848045d67063ddee
parente782955f6f6b0814685c9377b6663a76d18c0b7b (diff)
downloadzorglub-626aebd32b2fa899cfb67f3b569c7460aee9c9b0.zip
zorglub-626aebd32b2fa899cfb67f3b569c7460aee9c9b0.tar.gz
examples: use inherited_var instead of Zorglub::Helpers::Css
-rw-r--r--examples/layout/css.haml2
-rw-r--r--examples/sample.ru6
2 files changed, 3 insertions, 5 deletions
diff --git a/examples/layout/css.haml b/examples/layout/css.haml
index c9e35db..fbe0a47 100644
--- a/examples/layout/css.haml
+++ b/examples/layout/css.haml
@@ -1,5 +1,5 @@
%h1=@title
%p="xx <b>css</b> layout xx"
-%p="Css #{css.inspect}"
+%p="Css #{inherited_var(:css).inspect}"
%p=@content
%p="xx -- xx"
diff --git a/examples/sample.ru b/examples/sample.ru
index 6784d3d..32639b3 100644
--- a/examples/sample.ru
+++ b/examples/sample.ru
@@ -64,14 +64,12 @@ end
#
class Node2 < Zorglub::Node
#
- include Zorglub::Helpers::Css
- #
map APP, '/url2'
layout 'css'
# class level engine
engine 'tmp-engine'
# class level css
- css 'class_level.css'
+ inherited_var :css, 'class_level.css'
#
def index *args
"<title>Node2:index</title><b>START</b>#{html}<a href=#{Node2.r(:meth0)}>next</a><br/><b>END</b>"
@@ -79,7 +77,7 @@ class Node2 < Zorglub::Node
#
def meth0 *args
# instance level css
- css 'instance_level.css'
+ inherited_var :css, 'instance_level.css'
"<title>Node2:meth0</title><b>START</b>#{html}<a href=#{Node2.r(:meth1,1,2)}>next</a><br/><b>END</b>"
end
#