Class: I18nPhoneNumbers::PhoneNumberDesc
- Inherits:
-
Object
- Object
- I18nPhoneNumbers::PhoneNumberDesc
- Defined in:
- lib/i18n_phone_numbers/phone_number_desc.rb
Instance Attribute Summary collapse
-
#example_number ⇒ Object
The national_number_pattern is the pattern that a valid national significant number would match.
-
#national_number_pattern ⇒ Object
The national_number_pattern is the pattern that a valid national significant number would match.
-
#possible_number_pattern ⇒ Object
The national_number_pattern is the pattern that a valid national significant number would match.
Instance Method Summary collapse
-
#initialize(hash) ⇒ PhoneNumberDesc
constructor
A new instance of PhoneNumberDesc.
Constructor Details
#initialize(hash) ⇒ PhoneNumberDesc
Returns a new instance of PhoneNumberDesc.
23 24 25 26 27 28 29 |
# File 'lib/i18n_phone_numbers/phone_number_desc.rb', line 23 def initialize(hash) self.national_number_pattern = (hash["nationalNumberPattern"] || '').gsub(/\r?\n */,'') self.possible_number_pattern = (hash["possibleNumberPattern"] || '').gsub(/\r?\n */,'') self.example_number = (hash["exampleNumber"] || '').gsub(/\r?\n */,'') end |
Instance Attribute Details
#example_number ⇒ Object
The national_number_pattern is the pattern that a valid national significant number would match. This specifies information such as its total length and leading digits.
8 9 10 |
# File 'lib/i18n_phone_numbers/phone_number_desc.rb', line 8 def example_number @example_number end |
#national_number_pattern ⇒ Object
The national_number_pattern is the pattern that a valid national significant number would match. This specifies information such as its total length and leading digits.
8 9 10 |
# File 'lib/i18n_phone_numbers/phone_number_desc.rb', line 8 def national_number_pattern @national_number_pattern end |
#possible_number_pattern ⇒ Object
The national_number_pattern is the pattern that a valid national significant number would match. This specifies information such as its total length and leading digits.
8 9 10 |
# File 'lib/i18n_phone_numbers/phone_number_desc.rb', line 8 def possible_number_pattern @possible_number_pattern end |