Class: Inspec::Resources::PortsInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/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

FreeBsdPorts, LinuxPorts, LsofPorts, WindowsPorts

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inspec) ⇒ PortsInfo

Returns a new instance of PortsInfo.



109
110
111
# File 'lib/resources/port.rb', line 109

def initialize(inspec)
  @inspec = inspec
end

Instance Attribute Details

#inspecObject (readonly)

Returns the value of attribute inspec.



108
109
110
# File 'lib/resources/port.rb', line 108

def inspec
  @inspec
end