Class: Packages::Nuget::PackageFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/packages/nuget/package_finder.rb

Constant Summary collapse

MAX_PACKAGES_COUNT =
50

Instance Method Summary collapse

Constructor Details

#initialize(project, package_name:, package_version: nil, limit: MAX_PACKAGES_COUNT) ⇒ PackageFinder

Returns a new instance of PackageFinder.


7
8
9
10
11
12
# File 'app/finders/packages/nuget/package_finder.rb', line 7

def initialize(project, package_name:, package_version: nil, limit: MAX_PACKAGES_COUNT)
  @project = project
  @package_name = package_name
  @package_version = package_version
  @limit = limit
end

Instance Method Details

#executeObject


14
15
16
# File 'app/finders/packages/nuget/package_finder.rb', line 14

def execute
  packages.limit_recent(@limit)
end