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.



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

#nameObject

Returns the value of attribute name.



141
142
143
# File 'lib/license_finder/packages/npm_package.rb', line 141

def name
  @name
end

#package_namesObject

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

Returns:

  • (Boolean)


148
149
150
# File 'lib/license_finder/packages/npm_package.rb', line 148

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

#to_sObject



152
153
154
# File 'lib/license_finder/packages/npm_package.rb', line 152

def to_s
  @name
end