Class: TimezoneGeo
- Inherits:
-
Object
- Object
- TimezoneGeo
- Defined in:
- lib/ipgeolocation_io/TimezoneGeo.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#countryCode2 ⇒ Object
readonly
Returns the value of attribute countryCode2.
-
#countryCode3 ⇒ Object
readonly
Returns the value of attribute countryCode3.
-
#countryName ⇒ Object
readonly
Returns the value of attribute countryName.
-
#district ⇒ Object
readonly
Returns the value of attribute district.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#stateProvince ⇒ Object
readonly
Returns the value of attribute stateProvince.
-
#zipCode ⇒ Object
readonly
Returns the value of attribute zipCode.
Instance Method Summary collapse
-
#initialize(json) ⇒ TimezoneGeo
constructor
A new instance of TimezoneGeo.
Constructor Details
#initialize(json) ⇒ TimezoneGeo
Returns a new instance of TimezoneGeo.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 12 def initialize(json) @countryCode2 = json["country_code2"]; @countryCode3 = json["country_code3"]; @countryName = json["country_name"]; @stateProvince = json["state_prov"]; @district = json["district"]; @city = json["city"]; @zipCode = json["zipcode"]; @latitude = json["latitude"]; @longitude = json["longitude"]; end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
7 8 9 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 7 def city @city end |
#countryCode2 ⇒ Object (readonly)
Returns the value of attribute countryCode2.
2 3 4 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 2 def countryCode2 @countryCode2 end |
#countryCode3 ⇒ Object (readonly)
Returns the value of attribute countryCode3.
3 4 5 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 3 def countryCode3 @countryCode3 end |
#countryName ⇒ Object (readonly)
Returns the value of attribute countryName.
4 5 6 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 4 def countryName @countryName end |
#district ⇒ Object (readonly)
Returns the value of attribute district.
6 7 8 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 6 def district @district end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
9 10 11 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 9 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
10 11 12 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 10 def longitude @longitude end |
#stateProvince ⇒ Object (readonly)
Returns the value of attribute stateProvince.
5 6 7 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 5 def stateProvince @stateProvince end |
#zipCode ⇒ Object (readonly)
Returns the value of attribute zipCode.
8 9 10 |
# File 'lib/ipgeolocation_io/TimezoneGeo.rb', line 8 def zipCode @zipCode end |