class Mihari::Structs::Shodan::Match

Public Class Methods

from_dynamic!(d) click to toggle source
# File lib/mihari/structs/shodan.rb, line 27
def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    asn: d.fetch("asn"),
    hostnames: d.fetch("hostnames"),
    location: Location.from_dynamic!(d.fetch("location")),
    domains: d.fetch("domains"),
    ip_str: d.fetch("ip_str")
  )
end