Class: DInstaller::PackageCallbacks

Inherits:
Object
  • Object
show all
Defined in:
lib/dinstaller/package_callbacks.rb

Overview

This class represents the installer status

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pkg_count, progress) ⇒ PackageCallbacks

Returns a new instance of PackageCallbacks.



36
37
38
39
40
# File 'lib/dinstaller/package_callbacks.rb', line 36

def initialize(pkg_count, progress)
  @total = pkg_count
  @installed = 0
  @progress = progress
end

Class Method Details

.setup(pkg_count, progress) ⇒ Object



31
32
33
# File 'lib/dinstaller/package_callbacks.rb', line 31

def setup(pkg_count, progress)
  new(pkg_count, progress).setup
end

Instance Method Details

#setupObject



42
43
44
45
46
# File 'lib/dinstaller/package_callbacks.rb', line 42

def setup
  Yast::Pkg.CallbackDonePackage(
    fun_ref(method(:package_installed), "string (integer, string)")
  )
end