lib/instructions/name/name_random_bound.rb in nudge-0.2.6 vs lib/instructions/name/name_random_bound.rb in nudge-0.2.7
- old
+ new
@@ -1,4 +1,13 @@
+# Creates a new ReferencePoint and pushes it onto the +:name+ stack.
+# The name will be randomly sampled (with uniform probability) from the union of all
+# currently bound variables and names.
+#
+# needs: at least one bound variable or name
+#
+# pushes: 1 +:name+
+#
+
class NameRandomBoundInstruction < Instruction
def preconditions?
@context.references.length > 0
end
def setup