Sha256: 054bda7575aa6b2924939c34dd716096576f5a64d266d0ef4ed1a59962dce0be

Contents?: true

Size: 320 Bytes

Versions: 6

Compression:

Stored size: 320 Bytes

Contents

require_relative 'pattern1'

module BrDocuments
  module IE
    class SC < Pattern1
      def initialize(number)
        super
        @mask = /^(\d{3}\.\d{3}\.\d{3})$|^(\d{9})$/
      end

      private

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