Class: Mihari::Structs::MMDB::Country
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::MMDB::Country
- Defined in:
- lib/mihari/structs/mmdb.rb
Instance Attribute Summary collapse
- #autonomous_system_number ⇒ String readonly
- #iso_code ⇒ String readonly
Class Method Summary collapse
Instance Attribute Details
#autonomous_system_number ⇒ String (readonly)
13 |
# File 'lib/mihari/structs/mmdb.rb', line 13 attribute :autonomous_system_number, Types::String.optional |
#iso_code ⇒ String (readonly)
9 |
# File 'lib/mihari/structs/mmdb.rb', line 9 attribute :iso_code, Types::String |
Class Method Details
.from_dynamic!(d) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/mihari/structs/mmdb.rb', line 16 def from_dynamic!(d) d = Types::Hash[d] new( iso_code: d.fetch("iso_code"), autonomous_system_number: d["AutonomousSystemNumber"] ) end |