diff options
Diffstat (limited to 'lib/evendoors/room.rb')
-rw-r--r-- | lib/evendoors/room.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/evendoors/room.rb b/lib/evendoors/room.rb index bc9ee63..d06c00f 100644 --- a/lib/evendoors/room.rb +++ b/lib/evendoors/room.rb @@ -28,22 +28,22 @@ module EvenDoors end # def start! - puts " * start #{path}" if EvenDoors::Twirl.debug_routing + puts " * start #{path}" if EvenDoors::Spin.debug_routing @spots.values.each do |spot| spot.start! if spot.respond_to? :start! end end # def stop! - puts " * stop #{path}" if EvenDoors::Twirl.debug_routing + puts " * stop #{path}" if EvenDoors::Spin.debug_routing @spots.values.each do |spot| spot.stop! if spot.respond_to? :stop! end end # - def space - return @space if @space - @space = ( @parent.nil? ? self : @parent.space ) + def spin + return @spin if @spin + @spin = ( @parent.nil? ? self : @parent.spin ) end # def try_links p - puts " -> try_links ..." if EvenDoors::Twirl.debug_routing + puts " -> try_links ..." if EvenDoors::Spin.debug_routing links = @links[p.src.name] return false if links.nil? pending_link = nil @@ -54,7 +54,7 @@ module EvenDoors if apply_link or (p.link_value==link.cond_value) # link matches ! if pending_link - p2 = EvenDoors::Twirl.require_p p.class + p2 = EvenDoors::Spin.require_p p.class p2.clone_data p p2.apply_link! link send_p p2 @@ -87,10 +87,10 @@ module EvenDoors end # def send_p p - puts " * send_p #{(p.next_dst.nil? ? 'no dst' : p.next_dst)} ..." if EvenDoors::Twirl.debug_routing + puts " * send_p #{(p.next_dst.nil? ? 'no dst' : p.next_dst)} ..." if EvenDoors::Spin.debug_routing if p.src.nil? # do not route orphan particles !! - p.error! EvenDoors::ERROR_ROUTE_NS, space + p.error! EvenDoors::ERROR_ROUTE_NS, spin elsif p.next_dst p.split_dst! if p.door @@ -104,31 +104,31 @@ module EvenDoors else p.error! EvenDoors::ERROR_ROUTE_NDNL end - puts " -> #{p.dst.path}#{EvenDoors::ACT_SEP}#{p.action}" if EvenDoors::Twirl.debug_routing - EvenDoors::Twirl.send_p p + puts " -> #{p.dst.path}#{EvenDoors::ACT_SEP}#{p.action}" if EvenDoors::Spin.debug_routing + EvenDoors::Spin.send_p p end # def send_sys_p p - puts " * send_sys_p #{(p.next_dst.nil? ? 'no dst' : p.next_dst)} ..." if EvenDoors::Twirl.debug_routing + puts " * send_sys_p #{(p.next_dst.nil? ? 'no dst' : p.next_dst)} ..." if EvenDoors::Spin.debug_routing if p.next_dst p.split_dst! if p.door route_p p elsif p.action - p.dst_routed! space + p.dst_routed! spin end else p.error! EvenDoors::ERROR_ROUTE_SND end - puts " -> #{p.dst.path}#{EvenDoors::ACT_SEP}#{p.action}" if EvenDoors::Twirl.debug_routing - EvenDoors::Twirl.send_sys_p p + puts " -> #{p.dst.path}#{EvenDoors::ACT_SEP}#{p.action}" if EvenDoors::Spin.debug_routing + EvenDoors::Spin.send_sys_p p end # def process_sys_p p if p.action==EvenDoors::SYS_ACT_ADD_LINK add_link EvenDoors::Link.from_particle_data p end - EvenDoors::Twirl.release_p p + EvenDoors::Spin.release_p p end # end |