new (Thor::Options)

    # File lib/thor/options.rb, line 65
        def initialize(switches)
          @defaults = {}
          @shorts = {}

          @leading_non_opts, @trailing_non_opts = [], []

          @switches = switches.inject({}) do |mem, (name, type)|
            if name.is_a?(Array)
              name, *shorts = name
            else
              name = name.to_s
              shorts = []
            end
            # we need both nice and dasherized form of switch name
            if name.index('-') == 0
              nice_name = undasherize name
            else
              nice_name = name
              name = dasherize name
            end
            # if there are no shortcuts specified, generate one using the first character
            shorts << "-" + nice_name[0,1] if shorts.empty? and nice_name.length > 1
            shorts.each { |short| @shorts[short] = name }

            # normalize type
            case type
            when TrueClass then type = :boolean
            when String
              @defaults[nice_name] = type
              type = :optional
            when Numeric
              @defaults[nice_name] = type
              type = :numeric
            end

            mem[name] = type
            mem
          end

          # remove shortcuts that happen to coincide with any of the main switches
          @shorts.keys.each do |short|
            @shorts.delete(short) if @switches.key?(short)
          end
        end