Class: RuGUI::BaseMainController

Inherits:
BaseController show all
Defined in:
lib/rugui/base_controller.rb

Overview

A base class for main controllers.

Provides a method for running the application as well as a method to quit.

Instance Attribute Summary

Attributes inherited from BaseController

#controllers, #models, #parent_controller, #views

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #main_controller, #post_registration, #register_controller, #register_model, #register_view

Methods included from InitializeHooks

included, #initialize_with_hooks, update_initialize_method

Methods included from SignalSupport

#autoconnect_declared_signals, included

Methods included from LogSupport

included, #logger

Methods included from PropertyObserver

#named_observable_property_updated, #property_updated

Methods included from FrameworkAdapters::FrameworkAdapterSupport

#framework_adapter_for, included, #load_framework_adapter

Methods inherited from BaseObject

#inspect

Constructor Details

This class inherits a constructor from RuGUI::BaseController

Instance Method Details

#framework_adapterObject

Returns the framework_adapter for this class.



173
174
175
# File 'lib/rugui/base_controller.rb', line 173

def framework_adapter
  framework_adapter_for('BaseMainController')
end

#quitObject

Exits from the application.



188
189
190
191
192
# File 'lib/rugui/base_controller.rb', line 188

def quit
  logger.info "Exiting the application through #{self.class.name}."
  self.framework_adapter.quit
  logger.info "Application finished."
end

#runObject

Runs the application.



180
181
182
183
# File 'lib/rugui/base_controller.rb', line 180

def run
  logger.info "Starting the application through #{self.class.name}."
  self.framework_adapter.run
end