From da6f1d375223217298b4609dc4eaf8d1d131901c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 11 May 2012 11:37:45 +0200 Subject: Board: adapt to non static way --- lib/evendoors/board.rb | 8 ++++---- 1 file 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 -- cgit v1.1-2-g2b99