lib/br_documents/ie/am.rb in br_documents-0.1.3 vs lib/br_documents/ie/am.rb in br_documents-0.2.0

- old
+ new

@@ -1,17 +1,18 @@ -require_relative "pattern1" +require_relative 'pattern1' module BrDocuments module IE class AM < Pattern1 def initialize(number) super @mask = /^(\d{2}\.\d{3}\.\d{3}\-\d{1})$|^(\d{9})$/ end private + def format_ie(number) - number.sub(/(\d{2})(\d{3})(\d{3})(\d{1})/, "\\1.\\2.\\3-\\4") + number.sub(/(\d{2})(\d{3})(\d{3})(\d{1})/, '\\1.\\2.\\3-\\4') end end end end