Class: Mihari::Structs::Censys::Location
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::Censys::Location
- Defined in:
- lib/mihari/structs/censys.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#country ⇒ String?
47 48 49 |
# File 'lib/mihari/structs/censys.rb', line 47 def country attributes[:country] end |
#country_code ⇒ String?
54 55 56 |
# File 'lib/mihari/structs/censys.rb', line 54 def country_code attributes[:country_code] end |
#to_geolocation ⇒ Mihari::Geolocation
Returns <description>.
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/mihari/structs/censys.rb', line 61 def to_geolocation # sometimes Censys overlooks country # then set geolocation as nil return nil if country.nil? Mihari::Geolocation.new( country: country, country_code: country_code ) end |