lib/br_documents/ie/rs.rb in br_documents-0.1.3 vs lib/br_documents/ie/rs.rb in br_documents-0.2.0
- old
+ new
@@ -1,6 +1,6 @@
-require_relative "pattern1"
+require_relative 'pattern1'
module BrDocuments
module IE
class RS < Pattern1
def initialize(number)
@@ -8,11 +8,12 @@
@mask = /^(\d{3}\/\d{7})$|^(\d{10})$/
@weight = [2, 9, 8, 7, 6, 5, 4, 3, 2]
end
private
+
def format_ie(number)
- number.sub(/(\d{3})(\d{7})/, "\\1/\\2")
+ number.sub(/(\d{3})(\d{7})/, '\\1/\\2')
end
end
end
end