class Mihari::Structs::Censys::Result

Public Class Methods

from_dynamic!(d) click to toggle source
# File lib/mihari/structs/censys.rb, line 65
def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    query: d.fetch("query"),
    total: d.fetch("total"),
    hits: d.fetch("hits", []).map { |x| Hit.from_dynamic!(x) },
    links: Links.from_dynamic!(d.fetch("links"))
  )
end