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)



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

attribute :port, Types::Int

Class Method Details

.from_dynamic!(d) ⇒ Object



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

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

Instance Method Details

#_portMihari::Port



80
81
82
# File 'lib/mihari/structs/censys.rb', line 80

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