From 002cd28c80324a44dd24b0d23139d42c756b4532 Mon Sep 17 00:00:00 2001 From: Sylvain Joyeux Date: Fri, 8 May 2026 22:16:51 -0300 Subject: [PATCH] fix: create each_direct_sensor on Link for consistency --- lib/sdf/link.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/sdf/link.rb b/lib/sdf/link.rb index a9a7689..0c4f273 100644 --- a/lib/sdf/link.rb +++ b/lib/sdf/link.rb @@ -14,10 +14,17 @@ def initialize(xml, parent = nil) # Enumerates this link's sensors # # @yieldparam [Sensor] sensor - def each_sensor(&block) + def each_direct_sensor(&block) @sensors.each(&block) end + # Enumerates this link's sensors + # + # @yieldparam [Sensor] sensor + def each_sensor(&block) + each_direct_sensor(&block) + end + # The model's pose w.r.t. its parent # # @return [Array]