Sha256: c191a4195a45e9f80524222c92e939171a44c54a6d1f05e08034f5ac68e5a91b
Contents?: true
Size: 243 Bytes
Versions: 9
Compression:
Stored size: 243 Bytes
Contents
module BrDanfe class Phone def self.format(phone) if phone.length == 10 phone.sub(/(\d{2})(\d{4})(\d{4})/, "(\\1) \\2-\\3") else phone.sub(/(\d{2})(\d{5})(\d{4})/, "(\\1) \\2-\\3") end end end end
Version data entries
9 entries across 9 versions & 1 rubygems