Class: MagickNumbers::Regon9
Instance Attribute Summary
Attributes inherited from Base
#length, #magick_array, #magick_number, #mask, #modulo, #regexp
Instance Method Summary collapse
-
#initialize(num) ⇒ Regon9
constructor
A new instance of Regon9.
Methods inherited from Base
#checksum, #valid?, #validate, #validate_length, #validate_regexp, #validate_sum_control
Constructor Details
#initialize(num) ⇒ Regon9
Returns a new instance of Regon9.
4 5 6 7 8 9 10 11 |
# File 'lib/magick_numbers/regon9.rb', line 4 def initialize(num) super num @mask = [8, 9, 2, 3, 4, 5, 6, 7] @modulo = 11 @regexp = /^\d{9}$/ @length = 9 end |