lib/clin/option_parser.rb
# Get the next possible argument in the list if the value is nil.
# @param value [String] current option value.
# Only get the next argument in the list if:
# - value is nil
# - the next argument is not an option(start with '-')
Get the next possible argument in the list if the value is nil.
Get the next possible argument in the list if the value is nil .
def complete(value)
    if value.nil? && @argv.any? && !@argv.first.start_with?('-')
      @argv.shift
    else
      value
    end
  end
def complete ( value ) if value . nil? && @argv . any? && ! @argv . first . start_with? ( '-' ) @argv . shift else value end end
Get the next possible argument in the list if the value is nil.
Get the next possible argument in the list if the value is nil .
value
current option value. Only get the next argument in the list if: - value is nil - the next argument is not an option(start with '-')
current option value . Only get the next argument in the list if : - value is nil - the next argument is not an option ( start with ' - ' )