lib/clin/option_parser.rb
# Parse a flag option(No argument)
# Add [OptionUnexpectedArgumentError] If value is defined and the long version was used.
# Short flag option can be merged together(i.e these are equivalent: -abc, -a -b -c)
# In that case the value will be 'bc'. It will then try to parse b and c as flag options.
Parse a flag option(No argument)
Add [OptionUnexpectedArgumentError] If value is defined and the long version was used.
Short flag option can be merged together
In that case the value will be 'bc'. It will then try to parse b and c as flag options.
Parse a flag option ( No argument ) Add [ OptionUnexpectedArgumentError ] If value is defined and the long version was used . Short flag option can be merged together In that case the value will be ' bc ' . It will then try to parse b and c as flag options .
def parse_flag_option(option, value, short)
    return option.trigger(self, @options, true) if value.nil?
    unless short 
      return add_error Clin::OptionUnexpectedArgumentError.new(option, value)
    end
    option.trigger(self, @options, true)
    parse_compact_flag_options(value)
  end
def parse_flag_option ( option , value , short ) return option . trigger ( self , @options , true ) if value . nil? unless short return add_error Clin :: OptionUnexpectedArgumentError . new ( option , value ) end option . trigger ( self , @options , true ) parse_compact_flag_options ( value ) end
Parse a flag option(No argument)
Add [OptionUnexpectedArgumentError] If value is defined and the long version was used.
Parse a flag option ( No argument ) Add [ OptionUnexpectedArgumentError ] If value is defined and the long version was used .
# Short can also have the format -abc # The value is expected to be other flag options
option
<not_specific>
value
<not_specific>
short
<not_specific>