Method: Inspec::Resources::AptRepository#initialize

Defined in:
lib/resources/apt.rb

#initialize(ppa_name) ⇒ AptRepository

Returns a new instance of AptRepository.



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

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