any_to_instance_method_creator.rb

lib/alias/creators/any_to_instance_method_creator.rb
Last Update: Tue Jul 07 04:43:31 -0400 2009

Creates instance methods which can call any string of ruby code which ends in a method. This class provides the same functionality that Alias::Creators::ClassToInstanceMethodCreator provides and more but at the cost of less validation. Expects a hash of classes/modules of the instance method mapped to a hash of ruby code strings and the instance method names. For example, the hash {“MyDate”=>{‘Date.today.to_s.gsub’=>’t’}} creates a MyDate.t method which directly calls Date.today.to_s.gsub.