Class: BrDocuments::IE::PE::PE14
- Inherits:
-
BrDocuments::IE::Pattern1
- Object
- Base
- BrDocuments::IE::Pattern1
- BrDocuments::IE::PE::PE14
- Defined in:
- lib/br_documents/ie/pe.rb
Instance Method Summary collapse
-
#initialize(number) ⇒ PE14
constructor
A new instance of PE14.
Methods included from Commons::Mod11
#generate_digital_check, #reduce_weights
Methods inherited from Base
Constructor Details
#initialize(number) ⇒ PE14
Returns a new instance of PE14.
25 26 27 28 29 |
# File 'lib/br_documents/ie/pe.rb', line 25 def initialize(number) super @mask = /^(\d{2}\.\d{1}\.\d{3}\.\d{7}\-\d{1})$|^(\d{14})$/ @weight = [5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2] end |