Class: Mihari::Structs::GooglePublicDNS::Response
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::GooglePublicDNS::Response
- Defined in:
- lib/mihari/structs/google_public_dns.rb
Instance Attribute Summary collapse
- #answers ⇒ Array<Answer> readonly
Class Method Summary collapse
Instance Attribute Details
#answers ⇒ Array<Answer> (readonly)
42 |
# File 'lib/mihari/structs/google_public_dns.rb', line 42 attribute :answers, Types.Array(Answer) |
Class Method Details
.from_dynamic!(d) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/mihari/structs/google_public_dns.rb', line 48 def from_dynamic!(d) d = Types::Hash[d] new( answers: d.fetch("Answer", []).map { |x| Answer.from_dynamic!(x) } ) end |