Class: Censys::Location
- Inherits:
-
Object
- Object
- Censys::Location
- Defined in:
- lib/censys/location.rb
Instance Attribute Summary collapse
- #city ⇒ String readonly
- #continent ⇒ String readonly
- #country ⇒ String readonly
- #latitude ⇒ Float readonly
- #longitude ⇒ Float readonly
- #postal_code ⇒ String readonly
- #province ⇒ String readonly
- #registered_country ⇒ String readonly
- #registered_country_code ⇒ String readonly
- #timezone ⇒ String readonly
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Location
constructor
Initializes the location information.
Constructor Details
#initialize(attributes) ⇒ Location
Initializes the location information.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/censys/location.rb', line 38 def initialize(attributes) @attributes = attributes @postal_code = self['postal_code'] @city = self['city'] @province = self['province'] @country = self['country'] @continent = self['continent'] @registered_country = self['registered_country'] @registered_country_code = self['registered_country_code'] @timezone = self['timezone'] @latitude = self['latitude'] @longitude = self['longitude'] end |
Instance Attribute Details
#city ⇒ String (readonly)
7 8 9 |
# File 'lib/censys/location.rb', line 7 def city @city end |
#continent ⇒ String (readonly)
16 17 18 |
# File 'lib/censys/location.rb', line 16 def continent @continent end |
#country ⇒ String (readonly)
13 14 15 |
# File 'lib/censys/location.rb', line 13 def country @country end |
#latitude ⇒ Float (readonly)
28 29 30 |
# File 'lib/censys/location.rb', line 28 def latitude @latitude end |
#longitude ⇒ Float (readonly)
31 32 33 |
# File 'lib/censys/location.rb', line 31 def longitude @longitude end |
#postal_code ⇒ String (readonly)
4 5 6 |
# File 'lib/censys/location.rb', line 4 def postal_code @postal_code end |
#province ⇒ String (readonly)
10 11 12 |
# File 'lib/censys/location.rb', line 10 def province @province end |
#registered_country ⇒ String (readonly)
19 20 21 |
# File 'lib/censys/location.rb', line 19 def registered_country @registered_country end |
#registered_country_code ⇒ String (readonly)
22 23 24 |
# File 'lib/censys/location.rb', line 22 def registered_country_code @registered_country_code end |
#timezone ⇒ String (readonly)
25 26 27 |
# File 'lib/censys/location.rb', line 25 def timezone @timezone end |