Class: Mihari::Structs::Urlscan::Page

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/mihari/structs/urlscan.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#domainString (readonly)

Returns:

  • (String)


9
# File 'lib/mihari/structs/urlscan.rb', line 9

attribute :domain, Types::String.optional

#ipString? (readonly)

Returns:

  • (String, nil)


13
# File 'lib/mihari/structs/urlscan.rb', line 13

attribute :ip, Types::String.optional

#urlString (readonly)

Returns:

  • (String)


17
# File 'lib/mihari/structs/urlscan.rb', line 17

attribute :url, Types::String

Class Method Details

.from_dynamic!(d) ⇒ Object

Parameters:

  • d (Hash)


23
24
25
26
27
28
29
30
# File 'lib/mihari/structs/urlscan.rb', line 23

def from_dynamic!(d)
  d = Types::Hash[d]
  new(
    domain: d["domain"],
    ip: d["ip"],
    url: d.fetch("url")
  )
end