Class: Licensed::Sources::Bundler::Dependency
- Inherits:
-
Dependency
- Object
- Licensee::Projects::FSProject
- Dependency
- Licensed::Sources::Bundler::Dependency
- Defined in:
- lib/licensed/sources/bundler.rb
Constant Summary
Constants inherited from Dependency
Dependency::LEGAL_FILES_PATTERN
Instance Attribute Summary collapse
-
#loaded_from ⇒ Object
readonly
Returns the value of attribute loaded_from.
Attributes inherited from Dependency
#additional_terms, #errors, #name, #path, #version
Instance Method Summary collapse
-
#initialize(name:, version:, path:, loaded_from:, errors: [], metadata: {}) ⇒ Dependency
constructor
A new instance of Dependency.
-
#package_file ⇒ Object
Load a package manager file from the base Licensee::Projects::FsProject or from a gem specification file.
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_from ⇒ Object (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_file ⇒ Object
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 |