Class: Licensed::Sources::Bundler::Dependency

Inherits:
Dependency
  • Object
show all
Defined in:
lib/licensed/sources/bundler.rb

Constant Summary

Constants inherited from Dependency

Dependency::LEGAL_FILES_PATTERN

Instance Attribute Summary collapse

Attributes inherited from Dependency

#additional_terms, #errors, #name, #path, #version

Instance Method Summary collapse

Methods inherited from Dependency

#errors?, #exist?, #license_contents, #license_key, #metadata, #notice_contents, #project_files, #record

Constructor Details

#initialize(name:, version:, path:, loaded_from:, errors: [], metadata: {}) ⇒ Dependency

Returns a new instance of Dependency.



16
17
18
19
# File 'lib/licensed/sources/bundler.rb', line 16

def initialize(name:, version:, path:, loaded_from:, errors: [], metadata: {})
  @loaded_from = loaded_from
  super name: name, version: version, path: path, errors: errors, metadata: 
end

Instance Attribute Details

#loaded_fromObject (readonly)

Returns the value of attribute loaded_from.



14
15
16
# File 'lib/licensed/sources/bundler.rb', line 14

def loaded_from
  @loaded_from
end

Instance Method Details

#package_fileObject

Load a package manager file from the base Licensee::Projects::FsProject or from a gem specification file.



23
24
25
# File 'lib/licensed/sources/bundler.rb', line 23

def package_file
  super || spec_file
end