Class: Mihari::Structs::Censys::Result
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::Censys::Result
- Defined in:
- lib/mihari/structs/censys.rb
Class Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
79 80 81 82 83 84 85 86 87 |
# File 'lib/mihari/structs/censys.rb', line 79 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 |