Sha256: 43e37da74fc4d12ce327c01d67291e125b1529b0b99b1fd9e6fa324ddfbb2963
Contents?: true
Size: 393 Bytes
Versions: 6
Compression:
Stored size: 393 Bytes
Contents
require_relative 'pattern2' module BrDocuments module IE class PR < Pattern2 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 private def format_ie(number) number.sub(/(\d{8})(\d{2})/, '\\1-\\2') end end end end
Version data entries
6 entries across 6 versions & 1 rubygems