<commit_before>class Slop
  class Options < Array

    # @param [Boolean] symbols true to cast hash keys to symbols
    # @return [Hash]
    def to_hash(symbols)
      reduce({}) do |hsh, option|
        key = option.key
        key = key.to_sym if symbols
        hsh[key] = option.argument_value
        hsh
      end
    end

    # Fetch an Option object
    #
    # @param [Object] flag The short/long flag representing the option
    # @example
    #   opts = Slop.parse { on :v, "Verbose mode" }
    #   opts.options[:v] #=> Option<commit_msg>added @see tag to Options#to_hash<commit_after>class Slop
  class Options < Array

    # @param [Boolean] symbols true to cast hash keys to symbols
    # @see Slop#to_hash
    # @return [Hash]
    def to_hash(symbols)
      reduce({}) do |hsh, option|
        key = option.key
        key = key.to_sym if symbols
        hsh[key] = option.argument_value
        hsh
      end
    end

    # Fetch an Option object
    #
    # @param [Object] flag The short/long flag representing the option
    # @example
    #   opts = Slop.parse { on :v, "Verbose mode" }
    #   opts.options[:v] #=> Option
{'fraction_non_alphanumeric': 0.10070052539404553, 'fraction_numerical': 0.0, 'mean_word_length': 2.2657142857142856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5653088', 'n_tokens_mistral': 369, 'n_tokens_neox': 364, 'n_words': 117}