Class: LicenseFinder::NpmPackage::Group
- Inherits:
-
Object
- Object
- LicenseFinder::NpmPackage::Group
- Defined in:
- lib/license_finder/packages/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
Returns a new instance of Group.
190 191 192 193 |
# File 'lib/license_finder/packages/npm_package.rb', line 190 def initialize(name, hash) @name = name @package_names = hash.keys end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
188 189 190 |
# File 'lib/license_finder/packages/npm_package.rb', line 188 def name @name end |
#package_names ⇒ Object
Returns the value of attribute package_names.
188 189 190 |
# File 'lib/license_finder/packages/npm_package.rb', line 188 def package_names @package_names end |
Instance Method Details
#include?(identifier) ⇒ Boolean
195 196 197 |
# File 'lib/license_finder/packages/npm_package.rb', line 195 def include?(identifier) @package_names.include? identifier.name end |
#to_s ⇒ Object
199 200 201 |
# File 'lib/license_finder/packages/npm_package.rb', line 199 def to_s @name end |