Class: Mihari::Structs::GooglePublicDNS::Response

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/mihari/structs/google_public_dns.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#answersArray<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