def of number
      raise_on_type_mismatch number
      digits = convert_number_to_digits(number)[0..9]

      sum    = digits.reverse_each.with_index.reduce(0) do |check, (digit, idx)|
        check += digit * (idx+2)
      end

      check = (11 - sum % 11) % 11
      check == 10 ? "X" : check
    end
def of number
      raise_on_type_mismatch number
      digits = convert_number_to_digits(number)[0..9]

      sum    = digits.reverse_each.with_index.reduce(0) do |check, (digit, idx)|
        check += digit * (idx+2)
      end

      check = (11 - sum % 11) % 11
      check == 10 ? "X" : check
    end
Calculates ISBN-10 checksum

 @example
   Sjekksum::ISBN10.of("147743025") #=> 3
   Sjekksum::ISBN10.of("193435600") #=> "X"

 @param  number [Integer, String] number for which the checksum should be calculated

 @return [Integer, String] calculated checksum