Class: Spandx::Dotnet::NugetGateway

Inherits:
Core::Gateway show all
Defined in:
lib/spandx/dotnet/nuget_gateway.rb

Overview

Instance Attribute Summary

Attributes inherited from Core::Gateway

#http

Instance Method Summary collapse

Methods inherited from Core::Gateway

#initialize

Methods included from Core::Registerable

#all, #inherited, #registry

Constructor Details

This class inherits a constructor from Spandx::Core::Gateway

Instance Method Details

#each(start_page: 0) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/spandx/dotnet/nuget_gateway.rb', line 17

def each(start_page: 0)
  each_page(start_page: start_page) do |page_json|
    items_from(page_json).each do |item|
      yield(fetch_json(item['@id']), page_number_from(page_json['@id']))
    end
  end
end

#licenses_for(dependency) ⇒ Object



9
10
11
# File 'lib/spandx/dotnet/nuget_gateway.rb', line 9

def licenses_for(dependency)
  extract_licenses_from(nuspec_for(dependency.name, dependency.version))
end

#matches?(dependency) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/spandx/dotnet/nuget_gateway.rb', line 13

def matches?(dependency)
  dependency.package_manager == :nuget
end