module Mail::Utilities

def constantize( str )

constantize("hello-there-mate") #=> "HelloThereMate"
constantize("hello-there") #=> "HelloThere"
constantize("hello") #=> "Hello"

Example:

Takes an underscored word and turns it into a class name
def constantize( str )
  str.to_s.split(/[-_]/).map { |v| v.capitalize }.to_s
end