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.
143 144 145 146 |
# File 'lib/license_finder/packages/npm_package.rb', line 143 def initialize(name, hash) @name = name @package_names = hash.keys end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
141 142 143 |
# File 'lib/license_finder/packages/npm_package.rb', line 141 def name @name end |
#package_names ⇒ Object
Returns the value of attribute package_names.
141 142 143 |
# File 'lib/license_finder/packages/npm_package.rb', line 141 def package_names @package_names end |
Instance Method Details
#include?(identifier) ⇒ Boolean
148 149 150 |
# File 'lib/license_finder/packages/npm_package.rb', line 148 def include?(identifier) @package_names.include? identifier.name end |
#to_s ⇒ Object
152 153 154 |
# File 'lib/license_finder/packages/npm_package.rb', line 152 def to_s @name end |