Sha256: ddc3c344e1a668cc08442485864c8ca3b742ca087a7d8cf9fc25ef4e0afce9ce

Contents?: true

Size: 656 Bytes

Versions: 6

Compression:

Stored size: 656 Bytes

Contents

##
# This class is the master/parent class to all of the validation functionality
class PhoneNumberValidator
  class << self

    ##
    # Validates 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

6 entries across 6 versions & 1 rubygems

Version Path
phone_number_validator-0.4.8 lib/phone_number_validator.rb
phone_number_validator-0.4.7 lib/phone_number_validator.rb
phone_number_validator-0.4.6 lib/phone_number_validator.rb
phone_number_validator-0.4.5 lib/phone_number_validator.rb
phone_number_validator-0.4.4 lib/phone_number_validator.rb
phone_number_validator-0.4.3 lib/phone_number_validator.rb