Class: LicenseFinder::NpmPackage::Group
- Inherits:
-
Object
- Object
- LicenseFinder::NpmPackage::Group
- Defined in:
- lib/license_finder/package_managers/npm_package.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#package_identifiers ⇒ Object
Returns the value of attribute package_identifiers.
Instance Method Summary collapse
- #include?(identifier) ⇒ Boolean
-
#initialize(name, hash) ⇒ Group
constructor
A new instance of Group.
- #to_s ⇒ Object
Constructor Details
#initialize(name, hash) ⇒ Group
Returns a new instance of Group.
126 127 128 129 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 126 def initialize(name, hash) @name = name @package_names = hash.keys end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
124 125 126 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 124 def name @name end |
#package_identifiers ⇒ Object
Returns the value of attribute package_identifiers.
124 125 126 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 124 def package_identifiers @package_identifiers end |
Instance Method Details
#include?(identifier) ⇒ Boolean
131 132 133 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 131 def include?(identifier) @package_names.include? identifier.name end |
#to_s ⇒ Object
135 136 137 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 135 def to_s @name end |