Module: RosettAi::Plugins::GuiContract::ClassMethods
- Defined in:
- lib/rosett_ai/plugins/gui_contract.rb
Overview
GUI-specific class methods beyond the base Contract.
Instance Method Summary collapse
-
#application_class ⇒ Class
The main application class.
-
#available? ⇒ Boolean
Check if system dependencies for this GUI are available.
-
#dbus_interface_class ⇒ Class?
Optional D-Bus interface class.
-
#gui_name ⇒ String
GUI identifier (e.g. 'gtk4', 'qt6').
-
#launch(argv) ⇒ Integer
Launch the GUI application.
-
#plugin_name ⇒ Object
Convenience alias — delegates to plugin_name for Contract compatibility.
-
#plugin_type ⇒ Symbol
Return the plugin type identifier.
-
#required_system_packages ⇒ Array<String>
List system packages required by this GUI.
-
#toolkit ⇒ Symbol
Toolkit identifier (:gtk4, :qt6, etc.).
Instance Method Details
#application_class ⇒ Class
Returns the main application class.
41 42 43 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 41 def application_class raise NotImplementedError, "#{self}#application_class must return the application class" end |
#available? ⇒ Boolean
Check if system dependencies for this GUI are available.
48 49 50 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 48 def available? false end |
#dbus_interface_class ⇒ Class?
Returns optional D-Bus interface class.
69 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 69 def dbus_interface_class = nil |
#gui_name ⇒ String
Returns GUI identifier (e.g. 'gtk4', 'qt6').
31 32 33 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 31 def gui_name raise NotImplementedError, "#{self}#gui_name must return the GUI identifier" end |
#launch(argv) ⇒ Integer
Launch the GUI application.
56 57 58 59 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 56 def launch(argv) app = application_class.new app.run(argv) end |
#plugin_name ⇒ Object
Convenience alias — delegates to plugin_name for Contract compatibility.
72 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 72 def plugin_name = gui_name |
#plugin_type ⇒ Symbol
Return the plugin type identifier.
28 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 28 def plugin_type = :gui |
#required_system_packages ⇒ Array<String>
List system packages required by this GUI.
64 65 66 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 64 def required_system_packages [] end |
#toolkit ⇒ Symbol
Returns toolkit identifier (:gtk4, :qt6, etc.).
36 37 38 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 36 def toolkit raise NotImplementedError, "#{self}#toolkit must return a toolkit symbol" end |