Class: Yast::UIExtensionChecker
- Inherits:
-
Object
- Object
- Yast::UIExtensionChecker
- Includes:
- I18n, Logger
- Defined in:
- library/general/src/lib/ui/ui_extension_checker.rb
Overview
Class to check if a UI extension plug-in ("pkg", "graph") is installed. If it's not installed, ask the user if the package containing it should be installed and (if the user answers "yes") install it.
Instance Method Summary collapse
-
#initialize(ext_name, force_ui = true) ⇒ UIExtensionChecker
constructor
Constructor: Create a UI extension checker for the specified extension.
-
#ok? ⇒ Boolean
Check if the UI extension was either installed to begin with or if the user (after being asked) confirmed to install it, and it was installed successfully.
Constructor Details
#initialize(ext_name, force_ui = true) ⇒ UIExtensionChecker
Constructor: Create a UI extension checker for the specified extension.
35 36 37 38 39 40 41 42 |
# File 'library/general/src/lib/ui/ui_extension_checker.rb', line 35 def initialize(ext_name, force_ui = true) textdomain "base" @ext_name = ext_name @ok = false ensure_ui_created if force_ui @ui_plugin_info = UIPluginInfo.new ensure_ext_installed end |
Instance Method Details
#ok? ⇒ Boolean
Check if the UI extension was either installed to begin with or if the user (after being asked) confirmed to install it, and it was installed successfully.
50 51 52 |
# File 'library/general/src/lib/ui/ui_extension_checker.rb', line 50 def ok? @ok end |