| Class | Class |
| In: |
lib/mues/utils.rb
(CVS)
|
| Parent: | Object |
A couple of utility methods for the Class class.
Alias a class method.
# File lib/mues/utils.rb, line 54 def alias_class_method( newSym, oldSym ) retval = nil eval %{ class << self retval = alias_method :#{newSym}, :#{oldSym} end } return retval rescue Exception => err # Mangle exceptions to point someplace useful frames = err.backtrace frames.shift while frames.first =~ /#{__FILE__}/ Kernel::raise err, err.message.gsub(/in `\w+'/, "in `alias_class_method'"), frames end