Class: BrDocuments::IE::RS

Inherits:
Pattern1 show all
Defined in:
lib/br_documents/ie/rs.rb

Instance Method Summary collapse

Methods included from Commons::Mod11

#generate_check_digit, #reduce_weights

Methods inherited from Base

#formatted, #valid?

Constructor Details

#initialize(number) ⇒ RS

Returns a new instance of RS.



6
7
8
9
10
# File 'lib/br_documents/ie/rs.rb', line 6

def initialize(number)
  super
  @mask = /^(\d{3}\/\d{7})$|^(\d{10})$/
  @weight = [2, 9, 8, 7, 6, 5, 4, 3, 2]
end