Class RandomHash
In: rushcheck/hash.rb
Parent: Hash

RandomHash is a subclass of Hash which provides a random generator of hash. Programmer can make a subclass of RandomHash to make user defined random generator of Hash.


Included Modules


Public Class methods

class method set_pattern takes a hash object of random pattern. For example, the following pattern

  pat = { 'key1' => Integer, 'key2' => String }

means that an arbitrary hash is randomly generated which has two keys (say ‘key1’ and ‘key2’) and has indicated random object as its values.

Public Instance methods