<commit_before>require 'slop/commands'
require 'slop/command'
require 'slop/option_builder'
require 'slop/processor'
require 'slop/options'
require 'slop/option'
require 'slop/error'

class Slop
  VERSION = "4.0.0"

  class << self
    attr_accessor :config
  end

  self.config = {
    strict:            true,
    help:              true,
    ignore_case:       false,
    multiple_switches: true
  }

  def self.parse!(items = ARGV, config = {}, &block)
    Slop.new(config, &block).parse!(items)
  end

  def self.parse(items = ARGV, config = {}, &block)
    parse!(items.dup, config, &block)
  end

  attr_reader :command

  def initialize(config = {}, &block)
    @command = Command.new(:_global_, config, &block)
  end

  # Delegate methods to command object

  def respond_to_missing?(meth, include_private = false)
    command.respond_to_missing?(meth) || super
  end

  def method_missing(meth, *args, &block)
    if command.respond_to?(meth)
      command.send(meth, *args, &block)
    else
      super
    end
  end

end<commit_msg>Use public_send over send<commit_after>require 'slop/commands'
require 'slop/command'
require 'slop/option_builder'
require 'slop/processor'
require 'slop/options'
require 'slop/option'
require 'slop/error'

class Slop
  VERSION = "4.0.0"

  class << self
    attr_accessor :config
  end

  self.config = {
    strict:            true,
    help:              true,
    ignore_case:       false,
    multiple_switches: true
  }

  def self.parse!(items = ARGV, config = {}, &block)
    Slop.new(config, &block).parse!(items)
  end

  def self.parse(items = ARGV, config = {}, &block)
    parse!(items.dup, config, &block)
  end

  attr_reader :command

  def initialize(config = {}, &block)
    @command = Command.new(:_global_, config, &block)
  end

  # Delegate methods to command object

  def respond_to_missing?(meth, include_private = false)
    command.respond_to_missing?(meth) || super
  end

  def method_missing(meth, *args, &block)
    if command.respond_to?(meth)
      command.public_send(meth, *args, &block)
    else
      super
    end
  end

end
{'fraction_non_alphanumeric': 0.11960132890365449, 'fraction_numerical': 0.0028476506881822496, 'mean_word_length': 3.1011673151750974, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '1241733', 'n_tokens_mistral': 734, 'n_tokens_neox': 703, 'n_words': 172}