lib/git_clerk/opt_parser.rb
# Find key-value options and its values to the right
Find key-value options and its values to the right
Find key - value options and its values to the right
def detect_key_value_options!
      id_pairs = group_key_value_pairs_by_ids
      handle_unpermitted_values!(id_pairs)
      @key_value_options = id_pairs.map { |k, v| [args.delete_at(k), args.delete_at(v - 1)] }.to_h
    end
def detect_key_value_options! id_pairs = group_key_value_pairs_by_ids handle_unpermitted_values! ( id_pairs ) @key_value_options = id_pairs . map { | k , v | [ args . delete_at ( k ) , args . delete_at ( v - 1 ) ] } . to_h end
Find key-value options and its values to the right
Find key - value options and its values to the right
# Take out the key-value options from @args # After #delete_at(k), the real v value is shifted to the left. # That's why subtract 1