A Ruby implementation of the String Calculator kata.
- Add numbers in a string separated by commas or newlines.
- Supports custom delimiters, including multiple delimiters and delimiters of any length.
- Throws an exception for negative numbers.
- Ignores numbers greater than 1000.
StringCalculator.add("1,2,3") # => 6
StringCalculator.add("1\n2,3") # => 6
StringCalculator.add("//;\n1;2") # => 3
StringCalculator.add("//[*][%]\n1*2%3") # => 6
StringCalculator.add("//[***][%%]\n1***2%%3") # => 6bundle install
rspec