Class: Packages::PackageFileFinder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(package, file_name, params = {}) ⇒ PackageFileFinder

Returns a new instance of PackageFileFinder.



6
7
8
9
10
# File 'app/finders/packages/package_file_finder.rb', line 6

def initialize(package, file_name, params = {})
  @package = package
  @file_name = file_name
  @params = params
end

Instance Attribute Details

#file_nameObject (readonly)

Returns the value of attribute file_name.



4
5
6
# File 'app/finders/packages/package_file_finder.rb', line 4

def file_name
  @file_name
end

#packageObject (readonly)

Returns the value of attribute package.



4
5
6
# File 'app/finders/packages/package_file_finder.rb', line 4

def package
  @package
end

#paramsObject (readonly)

Returns the value of attribute params.



4
5
6
# File 'app/finders/packages/package_file_finder.rb', line 4

def params
  @params
end

Instance Method Details

#executeObject



12
13
14
# File 'app/finders/packages/package_file_finder.rb', line 12

def execute
  package_files.last
end

#execute!Object



16
17
18
# File 'app/finders/packages/package_file_finder.rb', line 16

def execute!
  package_files.last!
end