Module DRP::InstanceMethods
In: lib/instance_methods.rb


Public Instance methods

this is called when all rule methods are exhausted during the selection process. by default returns nil. you can override this in your extended class, but as a regular method not a rule method to have non-nil value returned, but be sure to accept an array of *args or have the arity correct to handle all your rule methods.

how deep is the current rule method’s recursion

uses next_codon to output to somewhere within the range specified using specified function, unless a block is given in which case it counts the formal parameters to the block, and yields appropriate number of codons using next_codon you may not pass both a block and a range, only one or the other

what is the maximum depth attainable by the current rule method. do not confuse this with the class method setter

you should reimplement this method in your extended class, that is unless you want the default behaviour of an endless random stream. this is included mostly for quick testing purposes

this is what weights and max_depths use to get codons. it defaults to just using next_codon. override it in your extended class to have them use a separate codon stream