Class: Mihari::Structs::Censys::Service

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

#portInteger? (readonly)

Returns:

  • (Integer, nil)


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

attribute :port, Types::Int

Class Method Details

.from_dynamic!(d) ⇒ Object

Parameters:

  • d (Hash)


86
87
88
89
90
91
# File 'lib/mihari/structs/censys.rb', line 86

def from_dynamic!(d)
  d = Types::Hash[d]
  new(
    port: d.fetch("port")
  )
end

Instance Method Details

#_portMihari::Port

Returns:

  • (Mihari::Port)


78
79
80
# File 'lib/mihari/structs/censys.rb', line 78

def _port
  Models::Port.new(number: port)
end