def to_parser(*args, &block)
      parser = ConfigParser.new(*args, &block)
      traverse do |nesting, config|
        next if config[:hidden] == true || nesting.any? {|nest| nest[:hidden] == true }
        
        nest_keys   = nesting.collect {|nest| nest.key }
        long, short = nesting.collect {|nest| nest.name }.push(config.name).join(':'), nil
        long, short = short, long if long.length == 1
        
        guess_attrs = {
          :long => long,
          :short => short
        }
        
        config_attrs = {
          :key       => config.key, 
          :nest_keys => nest_keys,
          :default   => config.default,
          :callback  => lambda {|value| config.type.cast(value) }
        }
        
        attrs = guess_attrs.merge(config.metadata).merge(config_attrs)
        parser.on(attrs)
      end
      
      parser.sort_opts!
      parser
    end
def to_parser(*args, &block)
      parser = ConfigParser.new(*args, &block)
      traverse do |nesting, config|
        next if config[:hidden] == true || nesting.any? {|nest| nest[:hidden] == true }
        
        nest_keys   = nesting.collect {|nest| nest.key }
        long, short = nesting.collect {|nest| nest.name }.push(config.name).join(':'), nil
        long, short = short, long if long.length == 1
        
        guess_attrs = {
          :long => long,
          :short => short
        }
        
        config_attrs = {
          :key       => config.key, 
          :nest_keys => nest_keys,
          :default   => config.default,
          :callback  => lambda {|value| config.type.cast(value) }
        }
        
        attrs = guess_attrs.merge(config.metadata).merge(config_attrs)
        parser.on(attrs)
      end
      
      parser.sort_opts!
      parser
    end
Initializes and returns a ConfigParser generated using the configs for
 self.  Arguments given to parser are passed to the ConfigParser
 initializer.