Class: Mihari::Structs::Urlscan::Response
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::Urlscan::Response
- Defined in:
- lib/mihari/structs/urlscan.rb
Instance Attribute Summary collapse
- #has_more ⇒ Boolean readonly
- #results ⇒ Array<Result> readonly
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#has_more ⇒ Boolean (readonly)
82 |
# File 'lib/mihari/structs/urlscan.rb', line 82 attribute :has_more, Types::Bool |
#results ⇒ Array<Result> (readonly)
78 |
# File 'lib/mihari/structs/urlscan.rb', line 78 attribute :results, Types.Array(Result) |
Class Method Details
.from_dynamic!(d) ⇒ Object
95 96 97 98 99 100 101 |
# File 'lib/mihari/structs/urlscan.rb', line 95 def from_dynamic!(d) d = Types::Hash[d] new( results: d.fetch("results").map { |x| Result.from_dynamic!(x) }, has_more: d.fetch("has_more") ) end |
Instance Method Details
#artifacts ⇒ Array<Mihari::Models::Artifact>
87 88 89 |
# File 'lib/mihari/structs/urlscan.rb', line 87 def artifacts results.map(&:artifacts).flatten end |