summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-04 09:56:41 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-04 09:56:41 +0200
commit95a62fc57568e58930d6404d0ad2c331c469a1ea (patch)
treed0c95cc199464f4f3ec4142766cfe89a33b66775
parent2848c599841ae851238a361e7a6c27aa869ea100 (diff)
downloadedoors-ruby-95a62fc57568e58930d6404d0ad2c331c469a1ea.zip
edoors-ruby-95a62fc57568e58930d6404d0ad2c331c469a1ea.tar.gz
add _p suffix to methods process, process_sys and receive
-rw-r--r--lib/evendoors/door.rb6
-rw-r--r--lib/evendoors/room.rb2
-rw-r--r--lib/evendoors/twirl.rb4
-rw-r--r--test/test_evendoors.rb4
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/evendoors/door.rb b/lib/evendoors/door.rb
index 9807d46..a3936ba 100644
--- a/lib/evendoors/door.rb
+++ b/lib/evendoors/door.rb
@@ -23,10 +23,10 @@ module EvenDoors
EvenDoors::Twirl.release_p p
end
#
- def process p
- @viewer.receive p if @viewer
+ def process_p p
+ @viewer.receive_p p if @viewer
@saved = p
- receive p
+ receive_p p
if not @saved.nil?
puts "application didn't give that particle back #{p}" if EvenDoors::Twirl.debug
puts "\t#{p.data EvenDoors::ERROR_FIELD}" if p.action==EvenDoors::ACT_ERROR
diff --git a/lib/evendoors/room.rb b/lib/evendoors/room.rb
index 0ca43bd..8a7e4d9 100644
--- a/lib/evendoors/room.rb
+++ b/lib/evendoors/room.rb
@@ -109,7 +109,7 @@ module EvenDoors
end
end
#
- def process_sys p
+ def process_sys_p p
if p.action==SYS_ACT_ADD_LINK
add_link EvenDoors::Link.from_particle_data p
end
diff --git a/lib/evendoors/twirl.rb b/lib/evendoors/twirl.rb
index 30ef169..5aa7d25 100644
--- a/lib/evendoors/twirl.rb
+++ b/lib/evendoors/twirl.rb
@@ -41,11 +41,11 @@ module EvenDoors
while @sys_fifo.length>0 or @app_fifo.length>0
while @sys_fifo.length>0
p = @sys_fifo.shift
- p.door.process_sys p
+ p.door.process_sys_p p
end
while @app_fifo.length>0
p = @app_fifo.shift
- p.door.process p
+ p.door.process_p p
end
end
end
diff --git a/test/test_evendoors.rb b/test/test_evendoors.rb
index 05b771b..204cc5d 100644
--- a/test/test_evendoors.rb
+++ b/test/test_evendoors.rb
@@ -18,7 +18,7 @@ class InputDoor < EvenDoors::Door
# puts " * stop #{self.class.name} #{@path}" if EvenDoors::Twirl.debug
# end
#
- def receive p
+ def receive_p p
puts " * #{self.class.name} receive_p : #{p.action}" if EvenDoors::Twirl.debug
if p.action==EvenDoors::ACT_GET
p.reset!
@@ -50,7 +50,7 @@ class OutputDoor < EvenDoors::Door
# puts " * stop #{self.class.name} #{@path}" if EvenDoors::Twirl.debug
# end
#
- def receive p
+ def receive_p p
if EvenDoors::Twirl.debug
puts " * #{self.class.name} receive_p : #{@path} : DATA #{p.get_data('line')}"
else