Class: Nzbn::Models::PhoneNumber
- Defined in:
- lib/nzbn/models/phone_number.rb
Overview
Phone number model
Instance Attribute Summary collapse
-
#phone_area_code ⇒ Object
Returns the value of attribute phone_area_code.
-
#phone_country_code ⇒ Object
Returns the value of attribute phone_country_code.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#phone_purpose ⇒ Object
Returns the value of attribute phone_purpose.
-
#phone_purpose_description ⇒ Object
Returns the value of attribute phone_purpose_description.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#unique_identifier ⇒ Object
Returns the value of attribute unique_identifier.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Nzbn::Models::Base
Instance Attribute Details
#phone_area_code ⇒ Object
Returns the value of attribute phone_area_code.
7 8 9 |
# File 'lib/nzbn/models/phone_number.rb', line 7 def phone_area_code @phone_area_code end |
#phone_country_code ⇒ Object
Returns the value of attribute phone_country_code.
7 8 9 |
# File 'lib/nzbn/models/phone_number.rb', line 7 def phone_country_code @phone_country_code end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
7 8 9 |
# File 'lib/nzbn/models/phone_number.rb', line 7 def phone_number @phone_number end |
#phone_purpose ⇒ Object
Returns the value of attribute phone_purpose.
7 8 9 |
# File 'lib/nzbn/models/phone_number.rb', line 7 def phone_purpose @phone_purpose end |
#phone_purpose_description ⇒ Object
Returns the value of attribute phone_purpose_description.
7 8 9 |
# File 'lib/nzbn/models/phone_number.rb', line 7 def phone_purpose_description @phone_purpose_description end |
#start_date ⇒ Object
Returns the value of attribute start_date.
7 8 9 |
# File 'lib/nzbn/models/phone_number.rb', line 7 def start_date @start_date end |
#unique_identifier ⇒ Object
Returns the value of attribute unique_identifier.
7 8 9 |
# File 'lib/nzbn/models/phone_number.rb', line 7 def unique_identifier @unique_identifier end |
Instance Method Details
#formatted_number ⇒ Object
10 11 12 13 |
# File 'lib/nzbn/models/phone_number.rb', line 10 def formatted_number parts = [phone_country_code, phone_area_code, phone_number].compact.reject(&:empty?) parts.join(' ') end |