method

configure_options

Importance_0
v1_9_3_125 - Show latest stable - 0 notes - Class: Command
configure_options(header, option_list) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/command.rb, line 436
  def configure_options(header, option_list)
    return if option_list.nil? or option_list.empty?

    header = header.to_s.empty? ? '' : "#{header} "
    @parser.separator "  #{header}Options:"

    option_list.each do |args, handler|
      args.select { |arg| arg =~ /^-/ }
      @parser.on(*args) do |value|
        handler.call(value, @options)
      end
    end

    @parser.separator ''
  end
Register or log in to add new notes.