Class: Licensed::Sources::Mix

Inherits:
Source
  • Object
show all
Defined in:
lib/licensed/sources/mix.rb

Defined Under Namespace

Classes: LockfileParser

Constant Summary collapse

LOCKFILE =
"mix.lock"

Instance Attribute Summary

Attributes inherited from Source

#config

Instance Method Summary collapse

Methods inherited from Source

#dependencies, full_type, #ignored?, inherited, #initialize, register_source, type, type_and_version

Constructor Details

This class inherits a constructor from Licensed::Sources::Source

Instance Method Details

#enabled?Boolean

Returns whether a mix.lock is present

Returns:

  • (Boolean)


10
11
12
# File 'lib/licensed/sources/mix.rb', line 10

def enabled?
  File.exist?(lockfile_path)
end

#enumerate_dependenciesObject



14
15
16
17
18
# File 'lib/licensed/sources/mix.rb', line 14

def enumerate_dependencies
  find_packages.map do |package|
    convert_package_to_dependency(package)
  end
end