Method: Inspec::Resources::AptRepository#initialize

Defined in:
lib/inspec/resources/apt.rb

#initialize(ppa_name) ⇒ AptRepository

Returns a new instance of AptRepository.



41
42
43
44
45
46
47
48
49
50
# File 'lib/inspec/resources/apt.rb', line 41

def initialize(ppa_name)
  @deb_url = nil
  # check if the os is ubuntu or debian
  if inspec.os.debian?
    @deb_url = determine_ppa_url(ppa_name)
  else
    # this resource is only supported on ubuntu and debian
    skip_resource "The `apt` resource is not supported on your OS yet."
  end
end