diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-11 11:37:45 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-12 09:38:01 +0200 |
commit | da6f1d375223217298b4609dc4eaf8d1d131901c (patch) | |
tree | 104e6f7639674f0551aec8ac05a3f2fcc7d4126a /lib/evendoors | |
parent | 033f72bcdd135ca68a565eeaf86f3326ac605f5d (diff) | |
download | edoors-ruby-da6f1d375223217298b4609dc4eaf8d1d131901c.zip edoors-ruby-da6f1d375223217298b4609dc4eaf8d1d131901c.tar.gz |
Board: adapt to non static way
Diffstat (limited to 'lib/evendoors')
-rw-r--r-- | lib/evendoors/board.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/evendoors/board.rb b/lib/evendoors/board.rb index 244f51b..ba05789 100644 --- a/lib/evendoors/board.rb +++ b/lib/evendoors/board.rb @@ -23,7 +23,7 @@ module EvenDoors # class Board < Door # - def initialize n, p=nil + def initialize n, p super n, p @postponed = {} end @@ -38,9 +38,9 @@ module EvenDoors # def self.json_create o raise EvenDoors::Exception.new "JSON #{o['kls']} != #{self.name}" if o['kls'] != self.name - board = self.new o['name'] - o['postponed'].each do |lv,p| - board.process_p EvenDoors::Particle.json_create p + board = self.new o['name'], o['parent'] + o['postponed'].each do |link_value,particle| + board.process_p EvenDoors::Particle.json_create(particle.merge!('parent'=>board)) end board end |