Method: IpTables#initialize

Defined in:
lib/resources/iptables.rb

#initialize(params = {}) ⇒ IpTables

Returns a new instance of IpTables.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/resources/iptables.rb', line 27

def initialize(params = {})
  @table = params[:table] || nil
  @chain = params[:chain] || nil

  # we're done if we are on linux
  return if inspec.os.linux?

  # ensures, all calls are aborted for non-supported os
  @iptables_cache = []
  skip_resource 'The `iptables` resource is not supported on your OS yet.'
end