Class: Mihari::Structs::Censys::Hit
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::Censys::Hit
- Defined in:
- lib/mihari/structs/censys.rb
Class Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mihari/structs/censys.rb', line 48 def self.from_dynamic!(d) d = Types::Hash[d] new( ip: d.fetch("ip"), location: Location.from_dynamic!(d.fetch("location")), autonomous_system: AutonomousSystem.from_dynamic!(d.fetch("autonomous_system")), metadata: d, services: d.fetch("services", []).map { |x| Service.from_dynamic!(x) } ) end |