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

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#codeInteger (readonly)

Returns:

  • (Integer)


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

attribute :code, Types::Int

#resultResult (readonly)

Returns:



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

attribute :result, Result

#statusString (readonly)

Returns:

  • (String)


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

attribute :status, Types::String

Class Method Details

.from_dynamic!(d) ⇒ Object

Parameters:

  • d (Hash)


233
234
235
236
237
238
239
240
# File 'lib/mihari/structs/censys.rb', line 233

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