Sha256: 06f9b09fe725191f544479da464599bbae972a711b2e9425e18b3482a8a387e9

Contents?: true

Size: 512 Bytes

Versions: 3

Compression:

Stored size: 512 Bytes

Contents

module TelephoneNumber
  module ClassMethods
    def parse(number, country = Parser.detect_country(number))
      TelephoneNumber::Number.new(number, country)
    end

    def valid?(number, country = Parser.detect_country(number), keys = [])
      parse(number, country).valid?(keys)
    end

    def invalid?(*args)
      !valid?(*args)
    end

    # generates binary file from xml that user gives us
    def generate_override_file(file)
      DataImporter.new(file, override: true).import!
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
telephone_number-1.1.1 lib/telephone_number/class_methods.rb
telephone_number-1.1.0 lib/telephone_number/class_methods.rb
telephone_number-1.0.0 lib/telephone_number/class_methods.rb