Class: Mihari::Structs::Censys::AutonomousSystem
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::Censys::AutonomousSystem
- Includes:
- Concerns::AutonomousSystemNormalizable
- Defined in:
- lib/mihari/structs/censys.rb
Instance Attribute Summary collapse
- #asn ⇒ Integer readonly
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Concerns::AutonomousSystemNormalizable
Instance Attribute Details
#asn ⇒ Integer (readonly)
11 |
# File 'lib/mihari/structs/censys.rb', line 11 attribute :asn, Types::Int |
Class Method Details
.from_dynamic!(d) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/mihari/structs/censys.rb', line 24 def from_dynamic!(d) d = Types::Hash[d] new( asn: d.fetch("asn") ) end |
Instance Method Details
#as ⇒ Mihari::AutonomousSystem
16 17 18 |
# File 'lib/mihari/structs/censys.rb', line 16 def as Mihari::Models::AutonomousSystem.new(number: normalize_asn(asn)) end |