Class: Inspec::Resources::PortsInfo
- Inherits:
-
Object
- Object
- Inspec::Resources::PortsInfo
- 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
Instance Attribute Summary collapse
-
#inspec ⇒ Object
readonly
Returns the value of attribute inspec.
Instance Method Summary collapse
-
#initialize(inspec, port = nil) ⇒ PortsInfo
constructor
A new instance of PortsInfo.
Constructor Details
#initialize(inspec, port = nil) ⇒ PortsInfo
Returns a new instance of PortsInfo.
105 106 107 108 |
# File 'lib/inspec/resources/port.rb', line 105 def initialize(inspec, port = nil) @inspec = inspec @port = port end |
Instance Attribute Details
#inspec ⇒ Object (readonly)
Returns the value of attribute inspec.
104 105 106 |
# File 'lib/inspec/resources/port.rb', line 104 def inspec @inspec end |