Method: Inspec::Resources::Bridge#initialize

Defined in:
lib/resources/bridge.rb

#initialize(bridge_name) ⇒ Bridge

Returns a new instance of Bridge.



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/resources/bridge.rb', line 21

def initialize(bridge_name)
  @bridge_name = bridge_name

  @bridge_provider = nil
  if inspec.os.linux?
    @bridge_provider = LinuxBridge.new(inspec)
  elsif inspec.os.windows?
    @bridge_provider = WindowsBridge.new(inspec)
  else
    return skip_resource 'The `bridge` resource is not supported on your OS yet.'
  end
end