Class: Mihari::Structs::GooglePublicDNS::Answer
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::GooglePublicDNS::Answer
- Defined in:
- lib/mihari/structs/google_public_dns.rb
Instance Attribute Summary collapse
- #data ⇒ String readonly
- #name ⇒ String readonly
- #resource_type ⇒ String readonly
Class Method Summary collapse
Instance Attribute Details
#data ⇒ String (readonly)
17 |
# File 'lib/mihari/structs/google_public_dns.rb', line 17 attribute :data, Types::String |
#name ⇒ String (readonly)
13 |
# File 'lib/mihari/structs/google_public_dns.rb', line 13 attribute :name, Types::String |
#resource_type ⇒ String (readonly)
21 |
# File 'lib/mihari/structs/google_public_dns.rb', line 21 attribute :resource_type, Types::String |
Class Method Details
.from_dynamic!(d) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/mihari/structs/google_public_dns.rb', line 27 def from_dynamic!(d) d = Types::Hash[d] resource_type = INT_TYPE_TO_TYPE[d.fetch("type")].to_s new( name: d.fetch("name"), data: d.fetch("data"), resource_type: resource_type ) end |