Class: Telesign::Phone

Inherits:
Object
  • Object
show all
Defined in:
lib/telesign/phone.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_codeObject

Returns the value of attribute country_code.



4
5
6
# File 'lib/telesign/phone.rb', line 4

def country_code
  @country_code
end

#numberObject

Returns the value of attribute number.



4
5
6
# File 'lib/telesign/phone.rb', line 4

def number
  @number
end