lib/simple_scripting/argv.rb
def process_option_definition!(param_definition, parser_opts, result)
      if param_definition[1] && param_definition[1].start_with?('--')
        key = param_definition[1].split(' ')[0][2 .. -1].tr('-', '_').to_sym
      else
        key = param_definition[0][1 .. -1].to_sym
      end

      parser_opts.on(*param_definition) do |value|
        result[key] = value || true
      end
    end
def process_option_definition!(param_definition, parser_opts, result)
      if param_definition[1] && param_definition[1].start_with?('--')
        key = param_definition[1].split(' ')[0][2 .. -1].tr('-', '_').to_sym
      else
        key = param_definition[0][1 .. -1].to_sym
      end

      parser_opts.on(*param_definition) do |value|
        result[key] = value || true
      end
    end
def process_option_definition! ( param_definition , parser_opts , result ) if param_definition [ 1 ] && param_definition [ 1 ] . start_with? ( '--' ) key = param_definition [ 1 ] . split ( ' ' ) [ 0 ] [ 2 .. - 1 ] . tr ( '-' , '_' ) . to_sym else key = param_definition [ 0 ] [ 1 .. - 1 ] . to_sym end parser_opts . on ( param_definition ) do | value | result [ key ] = value || true end end
DEFINITIONS PROCESSING
DEFINITIONS PROCESSING