summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-01-08 00:39:19 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-01-08 00:39:19 +0100
commit8b5ac512744905424c191ea56124a0e7b9f1f787 (patch)
treea6a2c72a3760a9d9d3d3d48f1e4f841dcdc2ccd0 /lib
parent929f5c6d149ee0b3a94174c764d7e5101366e26b (diff)
downloadzorglub-8b5ac512744905424c191ea56124a0e7b9f1f787.zip
zorglub-8b5ac512744905424c191ea56124a0e7b9f1f787.tar.gz
inherited_vars can be modified at instance level too, but do not impact class level
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/node.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb
index 6619010..5421046 100644
--- a/lib/zorglub/node.rb
+++ b/lib/zorglub/node.rb
@@ -174,12 +174,13 @@ module Zorglub
end
#
def inherited_var sym, *args
- d = self.class.inherited_vars[sym].clone || []
+ @instance_inherited_vars ||={}
+ var= @instance_inherited_vars[sym] ||= self.class.inherited_vars[sym].clone || []
unless args.empty?
- d.concat args
- d.uniq!
+ var.concat args
+ var.uniq!
end
- d
+ var
end
#
# before_all and after_all hooks