Class: LicenseFinder::Mix

Inherits:
PackageManager show all
Defined in:
lib/license_finder/package_managers/mix.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PackageManager

#active?, active_package_managers, active_packages, command_exists?, #current_packages_with_relations, #detected_package_path, installed?, package_managers, #prepare, prepare_command, takes_priority_over

Constructor Details

#initialize(options = {}) ⇒ Mix

Returns a new instance of Mix.



3
4
5
6
7
# File 'lib/license_finder/package_managers/mix.rb', line 3

def initialize(options = {})
  super
  @command = options[:mix_command] || Mix.package_management_command
  @deps_path = Pathname(options[:mix_deps_dir] || 'deps')
end

Class Method Details

.package_management_commandObject



20
21
22
# File 'lib/license_finder/package_managers/mix.rb', line 20

def self.package_management_command
  'mix'
end

Instance Method Details

#current_packagesObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/license_finder/package_managers/mix.rb', line 9

def current_packages
  mix_output.map do |name, version|
    MixPackage.new(
      name,
      version,
      install_path: @deps_path.join(name),
      logger: logger
    )
  end
end