Class: Packages::Maven::PackageFinder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, current_user, project: nil, group: nil) ⇒ PackageFinder

Returns a new instance of PackageFinder.


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

def initialize(path, current_user, project: nil, group: nil)
  @path = path
  @current_user = current_user
  @project = project
  @group = group
end

Instance Attribute Details

#current_userObject (readonly)

Returns the value of attribute current_user


5
6
7
# File 'app/finders/packages/maven/package_finder.rb', line 5

def current_user
  @current_user
end

#groupObject (readonly)

Returns the value of attribute group


5
6
7
# File 'app/finders/packages/maven/package_finder.rb', line 5

def group
  @group
end

#pathObject (readonly)

Returns the value of attribute path


5
6
7
# File 'app/finders/packages/maven/package_finder.rb', line 5

def path
  @path
end

#projectObject (readonly)

Returns the value of attribute project


5
6
7
# File 'app/finders/packages/maven/package_finder.rb', line 5

def project
  @project
end

Instance Method Details

#executeObject


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

def execute
  packages_with_path.last
end

#execute!Object


18
19
20
# File 'app/finders/packages/maven/package_finder.rb', line 18

def execute!
  packages_with_path.last!
end