Sha256: 3deccb6cc76f181b06888c64433278d5075451d37c72997cc44ea1ed4cb38b07

Contents?: true

Size: 589 Bytes

Versions: 29

Compression:

Stored size: 589 Bytes

Contents

module TelephoneNumber
  class NumberFormat

    attr_reader :pattern, :leading_digits, :format, :national_prefix_formatting_rule, :intl_format

    def initialize(data_hash, country_prefix_formatting_rule)
      @pattern = Regexp.new(data_hash[:pattern]) if data_hash[:pattern]
      @leading_digits = Regexp.new(data_hash[:leading_digits]) if data_hash[:leading_digits]
      @format = data_hash[:format]
      @intl_format = data_hash[:intl_format]
      @national_prefix_formatting_rule = data_hash[:national_prefix_formatting_rule] || country_prefix_formatting_rule
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
telephone_number-1.4.22 lib/telephone_number/number_format.rb
telephone_number-1.4.21 lib/telephone_number/number_format.rb
telephone_number-1.4.20 lib/telephone_number/number_format.rb
telephone_number-1.4.19 lib/telephone_number/number_format.rb
telephone_number-1.4.18 lib/telephone_number/number_format.rb
telephone_number-1.4.16 lib/telephone_number/number_format.rb
telephone_number-1.4.15 lib/telephone_number/number_format.rb
telephone_number-1.4.14 lib/telephone_number/number_format.rb
telephone_number-1.4.13 lib/telephone_number/number_format.rb
telephone_number-1.4.12 lib/telephone_number/number_format.rb
telephone_number-1.4.11 lib/telephone_number/number_format.rb
telephone_number-1.4.10 lib/telephone_number/number_format.rb
telephone_number-1.4.9 lib/telephone_number/number_format.rb
telephone_number-1.4.8 lib/telephone_number/number_format.rb
telephone_number-1.4.7 lib/telephone_number/number_format.rb
telephone_number-1.4.6 lib/telephone_number/number_format.rb
telephone_number-1.4.5 lib/telephone_number/number_format.rb
telephone_number-1.4.4 lib/telephone_number/number_format.rb
telephone_number-1.4.3 lib/telephone_number/number_format.rb
telephone_number-1.4.2 lib/telephone_number/number_format.rb