Class: Torasup::PhoneNumber

Inherits:
Object
  • Object
show all
Defined in:
lib/torasup/phone_number.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_codeObject (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_codeObject (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_idObject (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_numberObject (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

#locationObject (readonly)

Returns the value of attribute location.



3
4
5
# File 'lib/torasup/phone_number.rb', line 3

def location
  @location
end

#numberObject (readonly)

Returns the value of attribute number.



3
4
5
# File 'lib/torasup/phone_number.rb', line 3

def number
  @number
end

#operatorObject (readonly)

Returns the value of attribute operator.



3
4
5
# File 'lib/torasup/phone_number.rb', line 3

def operator
  @operator
end

#prefixObject (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

#typeObject



12
13
14
# File 'lib/torasup/phone_number.rb', line 12

def type
  operator && operator.type
end