class Censys::Location
Attributes
city[R]
@return [String]
continent[R]
@return [String]
country[R]
@return [String]
country_code[R]
@return [String]
latitude[R]
@return [Float]
longitude[R]
@return [Float]
postal_code[R]
@return [String]
province[R]
@return [String]
registered_country[R]
@return [String]
registered_country_code[R]
@return [String]
timezone[R]
@return [String]
Public Class Methods
new(attributes)
click to toggle source
Initializes the location information.
@param [Hash{String => Object}] attributes
# File lib/censys/location.rb, line 43 def initialize(attributes) @attributes = attributes @city = self['city'] @continent = self['continent'] @country = self['country'] @country_code = self['country_code'] @latitude = self['latitude'] @longitude = self['longitude'] @postal_code = self['postal_code'] @province = self['province'] @registered_country = self['registered_country'] @registered_country_code = self['registered_country_code'] @timezone = self['timezone'] end
Private Instance Methods
[](key)
click to toggle source
# File lib/censys/location.rb, line 61 def [](key) @attributes[key] || @attributes["location.#{key}"] end