Class: Inspec::Resources::PortsInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/inspec/resources/port.rb

Overview

implements an info method and returns all ip adresses and protocols for each port [

'port' => 22,
'address' => '0.0.0.0'
'protocol' => 'tcp'

,

'port' => 22,
'address' => '::'
'protocol' => 'tcp6'

]

Direct Known Subclasses

AixPorts, FreeBsdPorts, LinuxPorts, LsofPorts, WindowsPorts

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inspec) ⇒ PortsInfo

Returns a new instance of PortsInfo.



105
106
107
# File 'lib/inspec/resources/port.rb', line 105

def initialize(inspec)
  @inspec = inspec
end

Instance Attribute Details

#inspecObject (readonly)

Returns the value of attribute inspec.



104
105
106
# File 'lib/inspec/resources/port.rb', line 104

def inspec
  @inspec
end