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)



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

attribute :code, Types::Int

#resultResult (readonly)



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

attribute :result, Result

#statusString (readonly)



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

attribute :status, Types::String

Class Method Details

.from_dynamic!(d) ⇒ Object



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

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