12 13 14 15 16 17 18 19 20 21
# File 'lib/mihari/structs/onyphe.rb', line 12 def self.from_dynamic!(d) d = Types::Hash[d] new( asn: d.fetch("asn"), ip: d.fetch("ip"), # Onyphe's country = 2-letter country code country_code: d["country"], metadata: d ) end