This class encapsulates a LogicalBlock permutation. Block permutations can take the form of a static string or a procedure. This makes it possible to have simple blocks and more complicated ones that take into account other variables, such as dynamic registers. The to_s method will return the string version of the permutation, regardless of whether or not the underlying permutation is a string or a procedure.
Returns the length of the string returned by to_s.
# File lib/rex/poly/block.rb, line 27 def length to_s.length end
Returns the string representation of the permutation. If the underlying permutation is a procedure, the procedure is called. Otherwise, the string representation of the permutation is returned.
# File lib/rex/poly/block.rb, line 36 def to_s if (@perm.kind_of?(Proc)) @perm.call(@block).to_s else @perm.to_s end end
Generated with the Darkfish Rdoc Generator 2.