lib/inspec/resources/default_gateway.rb
def interface
      %w{default 0.0.0.0}.each do |destination|
        return @routing_info[destination][0][1] if @routing_info.key?(destination)
      end
      # raise exception because no destination with value default or 0.0.0.0 is found in the routing table
      raise Inspec::Exceptions::ResourceFailed, "No routing found as part of default gateway"
    end
# fetches the interface assigned to the default gateway
fetches the interface assigned to the default gateway
fetches the interface assigned to the default gateway
def interface
      %w{default 0.0.0.0}.each do |destination|
        return @routing_info[destination][0][1] if @routing_info.key?(destination)
      end
      raise Inspec::Exceptions::ResourceFailed, "No routing found as part of default gateway"
    end
def interface %w{ default 0.0.0.0 } . each do | destination | return @routing_info [ destination ] [ 0 ] [ 1 ] if @routing_info . key? ( destination ) end raise Inspec :: Exceptions :: ResourceFailed , "No routing found as part of default gateway" end
fetches the interface assigned to the default gateway
fetches the interface assigned to the default gateway
# raise exception because no destination with value default or 0.0.0.0 is found in the routing table