Class: LicenseFinder::NpmPackage::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/license_finder/packages/npm_package.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



188
189
190
# File 'lib/license_finder/packages/npm_package.rb', line 188

def name
  @name
end

#package_namesObject

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

Returns:

  • (Boolean)


195
196
197
# File 'lib/license_finder/packages/npm_package.rb', line 195

def include?(identifier)
  @package_names.include? identifier.name
end

#to_sObject



199
200
201
# File 'lib/license_finder/packages/npm_package.rb', line 199

def to_s
  @name
end