Class: Mihari::Structs::GreyNoise::Response
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::GreyNoise::Response
- Defined in:
- lib/mihari/structs/greynoise.rb
Class Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/mihari/structs/greynoise.rb', line 43 def self.from_dynamic!(d) d = Types::Hash[d] new( complete: d.fetch("complete"), count: d.fetch("count"), data: d.fetch("data").map { |x| Datum.from_dynamic!(x) }, message: d.fetch("message"), query: d.fetch("query") ) end |