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 ⇒ Object
-
#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.
39 40 41 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 39 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.
46 47 48 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 46 def available? false end |
#dbus_interface_class ⇒ Class?
Returns optional D-Bus interface class.
67 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 67 def dbus_interface_class = nil |
#gui_name ⇒ String
Returns GUI identifier (e.g. 'gtk4', 'qt6').
29 30 31 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 29 def gui_name raise NotImplementedError, "#{self}#gui_name must return the GUI identifier" end |
#launch(argv) ⇒ Integer
Launch the GUI application.
54 55 56 57 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 54 def launch(argv) app = application_class.new app.run(argv) end |
#plugin_name ⇒ Object
Convenience alias — delegates to plugin_name for Contract compatibility.
70 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 70 def plugin_name = gui_name |
#plugin_type ⇒ Object
26 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 26 def plugin_type = :gui |
#required_system_packages ⇒ Array<String>
List system packages required by this GUI.
62 63 64 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 62 def required_system_packages [] end |
#toolkit ⇒ Symbol
Returns toolkit identifier (:gtk4, :qt6, etc.).
34 35 36 |
# File 'lib/rosett_ai/plugins/gui_contract.rb', line 34 def toolkit raise NotImplementedError, "#{self}#toolkit must return a toolkit symbol" end |