diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-16 14:16:18 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-16 14:16:18 +0100 |
commit | 71907c734febd304333be1c921402f155dcaa11d (patch) | |
tree | 162ef81e06a64d717b04570df406808568b195f6 /lib | |
parent | a9e7b5c1710c5dc5d9f91c4990e0cfa3beee3174 (diff) | |
download | zorglub-71907c734febd304333be1c921402f155dcaa11d.zip zorglub-71907c734febd304333be1c921402f155dcaa11d.tar.gz |
Node: set engine\!
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zorglub/node.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index 5ebebc2..ad4408c 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -13,18 +13,17 @@ module Zorglub # class << self # - attr_reader :hooks, :inherited_vars, :layout + attr_reader :hooks, :inherited_vars, :layout, :engine # def inherited sub sub.layout! layout||(self==Zorglub::Node ? Config.layout : nil ) - sub.engine engine + sub.engine! engine||(self==Zorglub::Node ? Config.engine : nil ) sub.instance_variable_set :@inherited_vars, {} @inherited_vars.each do |s,v| sub.inherited_var s, *v end end # - def engine engine=nil - @engine = engine unless engine.nil? or engine.empty? - @engine ||= Config.engine + def engine! engine + @engine = engine end # def no_layout! @@ -187,8 +186,11 @@ module Zorglub @options[:state] end # - def engine engine=nil - @options[:engine] = engine unless engine.nil? or engine.empty? + def engine! engine + @options[:engine] = engine + end + # + def engine @options[:engine] end # |