Class: TelephoneNumber::GeoLocator
- Inherits:
-
Object
- Object
- TelephoneNumber::GeoLocator
- Defined in:
- lib/telephone_number/geo_locator.rb
Instance Attribute Summary collapse
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#normalized_number ⇒ Object
readonly
Returns the value of attribute normalized_number.
-
#phone_number ⇒ Object
readonly
Returns the value of attribute phone_number.
Instance Method Summary collapse
-
#initialize(phone_number, locale) ⇒ GeoLocator
constructor
initialize with a phone_number object.
- #location_data ⇒ Object
Constructor Details
#initialize(phone_number, locale) ⇒ GeoLocator
initialize with a phone_number object
6 7 8 9 10 |
# File 'lib/telephone_number/geo_locator.rb', line 6 def initialize(phone_number, locale) @phone_number = phone_number @normalized_number = build_normalized_number @locale = locale end |
Instance Attribute Details
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
3 4 5 |
# File 'lib/telephone_number/geo_locator.rb', line 3 def locale @locale end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/telephone_number/geo_locator.rb', line 3 def location @location end |
#normalized_number ⇒ Object (readonly)
Returns the value of attribute normalized_number.
3 4 5 |
# File 'lib/telephone_number/geo_locator.rb', line 3 def normalized_number @normalized_number end |
#phone_number ⇒ Object (readonly)
Returns the value of attribute phone_number.
3 4 5 |
# File 'lib/telephone_number/geo_locator.rb', line 3 def phone_number @phone_number end |
Instance Method Details
#location_data ⇒ Object
16 17 18 |
# File 'lib/telephone_number/geo_locator.rb', line 16 def location_data @location_data ||= fetch_location_data end |