diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-09-13 10:12:55 +0200 | 
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-09-13 10:12:55 +0200 | 
| commit | 285fa24544bf5feffb08b56deb03ec224f1726b4 (patch) | |
| tree | 8b355476082aece51b41bd9516e18aa861488fbf /examples | |
| parent | b06ae981c92040fe06c0317f0d12dc3f02044d21 (diff) | |
| download | zorglub-285fa24544bf5feffb08b56deb03ec224f1726b4.zip zorglub-285fa24544bf5feffb08b56deb03ec224f1726b4.tar.gz  | |
add before_all and after_all hooks
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/layout/default.haml | 1 | ||||
| -rw-r--r-- | examples/sample.ru | 10 | 
2 files changed, 11 insertions, 0 deletions
diff --git a/examples/layout/default.haml b/examples/layout/default.haml index 6af5e38..8df684f 100644 --- a/examples/layout/default.haml +++ b/examples/layout/default.haml @@ -1,4 +1,5 @@  %h1=@title  %p="xx <b>default</b> layout xx" +%p="count #{Zorglub::Node.count}"  %p=@content  %p="xx -- xx" diff --git a/examples/sample.ru b/examples/sample.ru index 67937ac..6784d3d 100644 --- a/examples/sample.ru +++ b/examples/sample.ru @@ -13,6 +13,16 @@ Zorglub::Config.engine = 'haml'  Zorglub::Config.session_on = true  Zorglub::Config.root = File.dirname( File.absolute_path(__FILE__) )  # +class Zorglub::Node +    @count=0 +    class << self +        attr_accessor :count +    end +    before_all do |node| +        Zorglub::Node.count +=1 +    end +end +#  class Node1 < Zorglub::Node      #      def index a1, *a2  | 
