Class: Mihari::Structs::Censys::V2::Response

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeInteger (readonly)

Returns:

  • (Integer)


222
# File 'lib/mihari/structs/censys.rb', line 222

attribute :code, Types::Int

#resultResult (readonly)

Returns:



230
# File 'lib/mihari/structs/censys.rb', line 230

attribute :result, Result

#statusString (readonly)

Returns:

  • (String)


226
# File 'lib/mihari/structs/censys.rb', line 226

attribute :status, Types::String

Class Method Details

.from_dynamic!(d) ⇒ Object

Parameters:

  • d (Hash)


240
241
242
243
244
245
246
247
# File 'lib/mihari/structs/censys.rb', line 240

def from_dynamic!(d)
  d = Types::Hash[d]
  new(
    code: d.fetch("code"),
    status: d.fetch("status"),
    result: Result.from_dynamic!(d.fetch("result"))
  )
end

Instance Method Details

#artifactsObject



232
233
234
# File 'lib/mihari/structs/censys.rb', line 232

def artifacts
  result.artifacts
end