Class: Mihari::Structs::Censys::Location

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/mihari/structs/censys.rb

Class Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/mihari/structs/censys.rb', line 21

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    country: d["country"],
    country_code: d["country_code"]
  )
end