def show_help(out = STDOUT, width = 80)
            lines = ['', '']
            lines << title
            lines << title.gsub(/./, '=')
            lines << ''
            if purpose
                lines.concat(wrap_text(purpose, width))
                lines << ''
            end
            if copyright
                lines.concat(wrap_text("Copyright (c) #{copyright}", width))
                lines << ''
            end

            lines << 'USAGE'
            lines << '-----'
            pos_args = positional_args
            opt_args = size - pos_args.size
            usage_args = pos_args.map(&:to_use)
            usage_args << (requires_some? ? 'OPTIONS' : '[OPTIONS]') if opt_args > 0
            usage_args << rest_args.to_use if rest_args?
            lines.concat(wrap_text("  #{RUBY_ENGINE} #{$0} #{usage_args.join(' ')}", width))
            lines << ''

            if positional_args?
                max = positional_args.map{ |a| a.to_s.length }.max
                pos_args = positional_args
                pos_args << rest_args if rest_args?
                pos_args.each do |arg|
                    if arg.usage_break
                        lines << ''
                        lines << arg.usage_break
                    end
                    desc = arg.description
                    desc << "\n[Default: #{arg.default}]" unless arg.default.nil?
                    wrap_text(desc, width - max - 6).each_with_index do |line, i|
                        lines << "  %-#{max}s    %s" % [[arg.to_s][i], line]
                    end
                end
                lines << ''
            end
            if non_positional_args?
                lines << ''
                lines << 'OPTIONS'
                lines << '-------'
                max = non_positional_args.map{ |a| a.to_use.length }.max
                non_positional_args.each do |arg|
                    if arg.usage_break
                        lines << ''
                        lines << arg.usage_break
                    end
                    desc = arg.description
                    desc << "\n[Default: #{arg.default}]" unless arg.default.nil?
                    wrap_text(desc, width - max - 6).each_with_index do |line, i|
                        lines << "  %-#{max}s    %s" % [[arg.to_use][i], line]
                    end
                end
            end
            lines << ''

            lines.each{ |line| line.length < width ? out.puts(line) : out.print(line) } if out
            lines
        end
def show_help(out = STDOUT, width = 80)
            lines = ['', '']
            lines << title
            lines << title.gsub(/./, '=')
            lines << ''
            if purpose
                lines.concat(wrap_text(purpose, width))
                lines << ''
            end
            if copyright
                lines.concat(wrap_text("Copyright (c) #{copyright}", width))
                lines << ''
            end

            lines << 'USAGE'
            lines << '-----'
            pos_args = positional_args
            opt_args = size - pos_args.size
            usage_args = pos_args.map(&:to_use)
            usage_args << (requires_some? ? 'OPTIONS' : '[OPTIONS]') if opt_args > 0
            usage_args << rest_args.to_use if rest_args?
            lines.concat(wrap_text("  #{RUBY_ENGINE} #{$0} #{usage_args.join(' ')}", width))
            lines << ''

            if positional_args?
                max = positional_args.map{ |a| a.to_s.length }.max
                pos_args = positional_args
                pos_args << rest_args if rest_args?
                pos_args.each do |arg|
                    if arg.usage_break
                        lines << ''
                        lines << arg.usage_break
                    end
                    desc = arg.description
                    desc << "\n[Default: #{arg.default}]" unless arg.default.nil?
                    wrap_text(desc, width - max - 6).each_with_index do |line, i|
                        lines << "  %-#{max}s    %s" % [[arg.to_s][i], line]
                    end
                end
                lines << ''
            end
            if non_positional_args?
                lines << ''
                lines << 'OPTIONS'
                lines << '-------'
                max = non_positional_args.map{ |a| a.to_use.length }.max
                non_positional_args.each do |arg|
                    if arg.usage_break
                        lines << ''
                        lines << arg.usage_break
                    end
                    desc = arg.description
                    desc << "\n[Default: #{arg.default}]" unless arg.default.nil?
                    wrap_text(desc, width - max - 6).each_with_index do |line, i|
                        lines << "  %-#{max}s    %s" % [[arg.to_use][i], line]
                    end
                end
            end
            lines << ''

            lines.each{ |line| line.length < width ? out.puts(line) : out.print(line) } if out
            lines
        end
Generates a more detailed help screen.
 @param out [IO] an IO object on which the help information will be
   output. Pass +nil+ if no output to any device is desired.
 @param width [Integer] the width at which to wrap text.
 @return [Array] An array of lines of text, containing the help text.