Class: BrDocuments::IE::PR
- Defined in:
- lib/br_documents/ie/pr.rb
Instance Method Summary collapse
-
#initialize(number) ⇒ PR
constructor
A new instance of PR.
Methods included from Commons::Mod11
#generate_check_digit, #reduce_weights
Methods inherited from Base
Constructor Details
#initialize(number) ⇒ PR
Returns a new instance of PR.
6 7 8 9 10 11 |
# File 'lib/br_documents/ie/pr.rb', line 6 def initialize(number) super @mask = /^(\d{8}-\d{2})$|^(\d{10})$/ @weight1 = [3, 2, 7, 6, 5, 4, 3, 2] @weight2 = [4, 3, 2, 7, 6, 5, 4, 3, 2] end |