<commit_before>require_relative 'calculator'

module HowMany
  class App
    @@version = "0.0.1"
    @options = {}

    def self.version
      @@version
    end

    def run(args)
      @options = OptionsParser.parse(args)
      result = if @options.operation == 'till'
                 Calculator.how_many_till(@options.units_to, Time.parse(""))
               elsif @options.operation == 'in'
                 Calculator.how_many_in(@options.from_number, @options.from_units, @options.to_units, return_type: @options.type == "integer" ? "integer" : "float")
               end

      puts result
    rescue OptionParser::InvalidArgument, OptionParser::MissingArgument, OptionParser::InvalidOption => exception
      warn exception.message
      warn "For usage information, use -h or --help"
      exit 1
    end
  end
end<commit_msg>fix: use correct args to how_many_till<commit_after>require_relative 'calculator'

module HowMany
  class App
    @@version = "0.0.1"
    @options = {}

    def self.version
      @@version
    end

    def run(args)
      @options = OptionsParser.parse(args)
      result = if @options.operation == 'till'
                 Calculator.how_many_till(@options.to_units, @options.till_time)
               elsif @options.operation == 'in'
                 Calculator.how_many_in(@options.from_number, @options.from_units, @options.to_units, return_type: @options.type == "integer" ? "integer" : "float")
               end

      puts result
    rescue OptionParser::InvalidArgument, OptionParser::MissingArgument, OptionParser::InvalidOption => exception
      warn exception.message
      warn "For usage information, use -h or --help"
      exit 1
    end
  end
end
{'fraction_non_alphanumeric': 0.10699588477366255, 'fraction_numerical': 0.004703115814226925, 'mean_word_length': 2.7, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7263349', 'n_tokens_mistral': 505, 'n_tokens_neox': 490, 'n_words': 118}