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_names ⇒ Object
Returns the value of attribute package_names.
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
123 124 125 126 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 123 def initialize(name, hash) @name = name @package_names = hash.keys end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
121 122 123 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 121 def name @name end |
#package_names ⇒ Object
Returns the value of attribute package_names.
121 122 123 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 121 def package_names @package_names end |
Instance Method Details
#include?(identifier) ⇒ Boolean
128 129 130 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 128 def include?(identifier) @package_names.include? identifier.name end |
#to_s ⇒ Object
132 133 134 |
# File 'lib/license_finder/package_managers/npm_package.rb', line 132 def to_s @name end |