Sha256: 99d355d2bc284bb19d42eff17612340e03c0741beaa35478d566c310c4f9348f

Contents?: true

Size: 572 Bytes

Versions: 9

Compression:

Stored size: 572 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('+1 (949) 355-6244 ext. 198842')
    #
    # <b>Output:</b>
    #   => true
    #
    # <b>Arguments:</b>
    #   phone_number: (String)
    def validate(phone_number)
      validator = Validator.new(phone_number)
      validator.validate
    end
  end
end

require 'phone_number_validator/validator'

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
phone_number_validator-0.6.2 lib/phone_number_validator.rb
phone_number_validator-0.6.1 lib/phone_number_validator.rb
phone_number_validator-0.6.0 lib/phone_number_validator.rb
phone_number_validator-0.5.9 lib/phone_number_validator.rb
phone_number_validator-0.5.8 lib/phone_number_validator.rb
phone_number_validator-0.5.7 lib/phone_number_validator.rb
phone_number_validator-0.5.6 lib/phone_number_validator.rb
phone_number_validator-0.5.5 lib/phone_number_validator.rb
phone_number_validator-0.5.4 lib/phone_number_validator.rb