Method: Inspec::Resources::AptRepository#enabled?

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

#enabled?Boolean

Returns:

  • (Boolean)


56
57
58
59
60
61
# File 'lib/inspec/resources/apt.rb', line 56

def enabled?
  return false if find_repo.count == 0
  actives = find_repo.map { |repo| repo[:active] }
  actives = actives.uniq
  actives.size == 1 && actives[0] = true
end