Luhn algorithm implementation in Ruby