lib/motion/util.rb in rm-extensions-0.1.10 vs lib/motion/util.rb in rm-extensions-0.2.0

- old
+ new

@@ -29,9 +29,26 @@ else raise "rmext_ivar called with invalid arguments: #{args.inspect}" end end + def rmext_nil_instance_variables! + ivars = [] + instance_variables + while ivar = ivars.pop + instance_variable_set(ivar, nil) + end + true + end + + def rmext_assign_debug_labels_to_ivars! + ivars = [] + instance_variables + while ivar = ivars.pop + val = instance_variable_get(ivar) + val.rmext_ivar(:debug_label, ivar) + end + true + end + end end end