Class: CaptiveStackDetector::SystemPackageDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/captive_stack_detector/system_package_detector.rb

Instance Method Summary collapse

Constructor Details

#initialize(gemfile:, aptfile:) ⇒ SystemPackageDetector

Returns a new instance of SystemPackageDetector.



8
9
10
11
# File 'lib/captive_stack_detector/system_package_detector.rb', line 8

def initialize(gemfile:, aptfile:)
  @gemfile = gemfile.to_s
  @aptfile = aptfile.to_s
end

Instance Method Details

#packagesObject



13
14
15
16
17
# File 'lib/captive_stack_detector/system_package_detector.rb', line 13

def packages
  result = (from_gemfile + from_aptfile).uniq
  $stderr.puts "[captive-stack-detector] paquets système détectés : #{result.any? ? result.join(", ") : "aucun"}"
  result
end