Class: Torasup::PhoneNumber
- Inherits:
-
Object
- Object
- Torasup::PhoneNumber
- Defined in:
- lib/torasup/phone_number.rb
Instance Attribute Summary collapse
-
#area_code ⇒ Object
readonly
Returns the value of attribute area_code.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#country_id ⇒ Object
readonly
Returns the value of attribute country_id.
-
#local_number ⇒ Object
readonly
Returns the value of attribute local_number.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
-
#initialize(phone_number) ⇒ PhoneNumber
constructor
A new instance of PhoneNumber.
- #type ⇒ Object
Constructor Details
#initialize(phone_number) ⇒ PhoneNumber
Returns a new instance of PhoneNumber.
8 9 10 |
# File 'lib/torasup/phone_number.rb', line 8 def initialize(phone_number) parse_phone_number(phone_number) end |
Instance Attribute Details
#area_code ⇒ Object (readonly)
Returns the value of attribute area_code.
3 4 5 |
# File 'lib/torasup/phone_number.rb', line 3 def area_code @area_code end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
3 4 5 |
# File 'lib/torasup/phone_number.rb', line 3 def country_code @country_code end |
#country_id ⇒ Object (readonly)
Returns the value of attribute country_id.
3 4 5 |
# File 'lib/torasup/phone_number.rb', line 3 def country_id @country_id end |
#local_number ⇒ Object (readonly)
Returns the value of attribute local_number.
3 4 5 |
# File 'lib/torasup/phone_number.rb', line 3 def local_number @local_number end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/torasup/phone_number.rb', line 3 def location @location end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
3 4 5 |
# File 'lib/torasup/phone_number.rb', line 3 def number @number end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
3 4 5 |
# File 'lib/torasup/phone_number.rb', line 3 def operator @operator end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
3 4 5 |
# File 'lib/torasup/phone_number.rb', line 3 def prefix @prefix end |
Instance Method Details
#type ⇒ Object
12 13 14 |
# File 'lib/torasup/phone_number.rb', line 12 def type operator && operator.type end |