Module: Censys::Document::HasServices

Defined in:
lib/censys/document/has_services.rb

Instance Method Summary collapse

Instance Method Details

#portsHash{String => Hash}

Open ports.

Returns:

  • (Hash{String => Hash})


9
10
11
# File 'lib/censys/document/has_services.rb', line 9

def ports
  @ports ||= Hash[@attributes.select { |key, _| key =~ /\A\d+\z/ }]
end

#protocolsArray<String>

Returns:

  • (Array<String>)


16
17
18
# File 'lib/censys/document/has_services.rb', line 16

def protocols
  @attributes['protocols']
end