Class: Telesign::Phone
- Inherits:
-
Object
- Object
- Telesign::Phone
- Defined in:
- lib/telesign/phone.rb
Instance Attribute Summary collapse
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(number, country = "US") ⇒ Phone
constructor
A new instance of Phone.
Constructor Details
#initialize(number, country = "US") ⇒ Phone
Returns a new instance of Phone.
6 7 8 9 |
# File 'lib/telesign/phone.rb', line 6 def initialize(number, country = "US") self.number = number self.country_code = Country::country_code_for_name(country.to_s) end |
Instance Attribute Details
#country_code ⇒ Object
Returns the value of attribute country_code.
4 5 6 |
# File 'lib/telesign/phone.rb', line 4 def country_code @country_code end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/telesign/phone.rb', line 4 def number @number end |