lib/quickl/naming.rb
def command2module(name)
      case name
        when String
          name.gsub(/^(.)|-(.)/){|x| x.upcase}.gsub(/-/,'')
        when Symbol
          command2module(name.to_s).to_sym
        else
          raise ArgumentError, "Invalid name argument #{name.class}"
      end
    end
def command2module(name)
      case name
        when String
          name.gsub(/^(.)|-(.)/){|x| x.upcase}.gsub(/-/,'')
        when Symbol
          command2module(name.to_s).to_sym
        else
          raise ArgumentError, "Invalid name argument #{name.class}"
      end
    end
def command2module ( name ) case name when String name . gsub ( / / ) { | x | x . upcase } . gsub ( / / , '' ) when Symbol command2module ( name . to_s ) . to_sym else raise ArgumentError , "Invalid name argument #{name.class}" end end
Converts a command name to a module name. Implements
 the following conversions:

   hello -> Hello
   hello-world -> HelloWorld

 This method is part of Quickl's private interface even
 if its effect are considered public.
Converts a command name to a module name . Implements the following conversions :