Class: Mihari::Structs::HunterHow::Response

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#codeInteger (readonly)

Returns:

  • (Integer)


74
# File 'lib/mihari/structs/hunterhow.rb', line 74

attribute :code, Types::Int

#dataDataClass (readonly)

Returns:



78
# File 'lib/mihari/structs/hunterhow.rb', line 78

attribute :data, DataClass

#messageString (readonly)

Returns:

  • (String)


82
# File 'lib/mihari/structs/hunterhow.rb', line 82

attribute :message, Types::String

Class Method Details

.from_dynamic!(d) ⇒ Object

Parameters:

  • d (Hash)


88
89
90
91
92
93
94
95
# File 'lib/mihari/structs/hunterhow.rb', line 88

def from_dynamic!(d)
  d = Types::Hash[d]
  new(
    code: d.fetch("code"),
    data: DataClass.from_dynamic!(d.fetch("data")),
    message: d.fetch("message")
  )
end