Module: RandallMonkey

Defined in:
lib/randall/monkey_patch.rb

Overview

copyright © 2010, Diego Che

Defined Under Namespace

Modules: PickableArray, RandableRegexp

Class Method Summary collapse

Class Method Details

.patchObject

Enable the monkey patch. After this message, you have Array#pick and Regexp#rand.



25
26
27
28
29
30
31
32
33
# File 'lib/randall/monkey_patch.rb', line 25

def self.patch
  Array.class_eval do
    include PickableArray
  end
  
  Regexp.class_eval do
    include RandableRegexp
  end
end