# File lib/facet/crosscase.rb, line 224 def self::transform( mid ) methodName = mid.to_s transformedName = '' # camelCased methods if /[A-Z]/.match( methodName ) && !/_/.match( methodName ) transformedName = methodName.gsub( /([a-z0-9])([A-Z])/ ) {|match| $1 + '_' + $2 }.downcase # underbarred_methods elsif !/A-Z/.match( methodName ) && /[a-z0-9]_[a-z]/.match( methodName ) transformedName = methodName.gsub( /([a-z0-9])_([a-z])/ ) {|match| $1 + $2.upcase } else transformedName = nil end return transformedName end