Sha256: f68f86882399d19b5e265c856cc7f0b375b3b41d5d791e8957cdecb8b05246d6

Contents?: true

Size: 305 Bytes

Versions: 6

Compression:

Stored size: 305 Bytes

Contents

require_relative 'pattern2'

module BrDocuments
  module IE
    class DF < Pattern2
      def initialize(number)
        super
        @mask = /^(\d{11}\-\d{2})$|^(\d{13})$/
      end

      private

      def format_ie(number)
        number.sub(/(\d{11})(\d{2})/, '\\1-\\2')
      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/df.rb
br_documents-0.2.4 lib/br_documents/ie/df.rb
br_documents-0.2.3 lib/br_documents/ie/df.rb
br_documents-0.2.2 lib/br_documents/ie/df.rb
br_documents-0.2.1 lib/br_documents/ie/df.rb
br_documents-0.2.0 lib/br_documents/ie/df.rb