Class: Mihari::Structs::HunterHow::ListItem
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::HunterHow::ListItem
- Defined in:
- lib/mihari/structs/hunterhow.rb
Instance Attribute Summary collapse
- #domain ⇒ String readonly
- #ip ⇒ String readonly
- #port ⇒ Integer readonly
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#domain ⇒ String (readonly)
9 |
# File 'lib/mihari/structs/hunterhow.rb', line 9 attribute :domain, Types::String |
#ip ⇒ String (readonly)
13 |
# File 'lib/mihari/structs/hunterhow.rb', line 13 attribute :ip, Types::String |
#port ⇒ Integer (readonly)
17 |
# File 'lib/mihari/structs/hunterhow.rb', line 17 attribute :port, Types::Int |
Class Method Details
.from_dynamic!(d) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/mihari/structs/hunterhow.rb', line 30 def from_dynamic!(d) d = Types::Hash[d] new( domain: d.fetch("domain"), ip: d.fetch("ip"), port: d.fetch("port") ) end |
Instance Method Details
#artifact ⇒ Mihari::Models::Artifact
22 23 24 |
# File 'lib/mihari/structs/hunterhow.rb', line 22 def artifact Models::Artifact.new(data: ip) end |