Sha256: dd522c0a8e143be859ba75501491c9a8bdd94f92566a0df27cb25d1ff3bfa19a

Contents?: true

Size: 320 Bytes

Versions: 6

Compression:

Stored size: 320 Bytes

Contents

require_relative 'pattern1'

module BrDocuments
  module IE
    class PA < Pattern1
      def initialize(number)
        super
        @mask = /^(\d{2}\-\d{6}\-\d{1})$|^(\d{9})$/
      end

      private

      def format_ie(number)
        number.sub(/(\d{2})(\d{6})(\d{1})/, '\\1-\\2-\\3')
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
br_documents-0.2.5 lib/br_documents/ie/pa.rb
br_documents-0.2.4 lib/br_documents/ie/pa.rb
br_documents-0.2.3 lib/br_documents/ie/pa.rb
br_documents-0.2.2 lib/br_documents/ie/pa.rb
br_documents-0.2.1 lib/br_documents/ie/pa.rb
br_documents-0.2.0 lib/br_documents/ie/pa.rb