Sha256: ab25b1f34ca83170a23997050ace1b4f45e04e7de7eb387de66bcca2f92a25c7

Contents?: true

Size: 645 Bytes

Versions: 4

Compression:

Stored size: 645 Bytes

Contents

##
# = Phone Number \Validator Parent Class
class PhoneNumberValidator
  class << self

    ##
    # == Validate any United States phone number!
    #
    # <b>Example:</b>
    #   PhoneNumberValidator.validate_phone_number('+1 (949) 355-6244 ext. 198842')
    #
    # <b>Output:</b>
    #   => '+1 (949) 355-6244 ext. 198842' is a valid phone number.'
    #   => true
    #
    # <b>Arguments:</b>
    #   phone_number: (String)
    def validate_phone_number(phone_number)
      validator = Validator.new(phone_number)
      validator.validate_phone_number
    end
  end
end

require 'phone_number_validator/validator'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phone_number_validator-0.2.8 lib/phone_number_validator.rb
phone_number_validator-0.2.7 lib/phone_number_validator.rb
phone_number_validator-0.2.6 lib/phone_number_validator.rb
phone_number_validator-0.2.5 lib/phone_number_validator.rb