Sha256: 4493396fa0a103fd9122e1dc9302706e6c38e85ec431c623b98fdbbd025d71f3
Contents?: true
Size: 300 Bytes
Versions: 3
Compression:
Stored size: 300 Bytes
Contents
class Agilibox::PhoneNumberSanitizer attr_reader :phone_number def initialize(phone_number) @phone_number = phone_number end def call sanitized = phone_number.to_s.gsub(/[^0-9\+]+/, "") sanitized if sanitized.present? end def self.call(*args) new(*args).call end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
agilibox-1.0.12 | app/libs/agilibox/phone_number_sanitizer.rb |
agilibox-1.0.11 | app/libs/agilibox/phone_number_sanitizer.rb |
agilibox-1.0.10 | app/libs/agilibox/phone_number_sanitizer.rb |