Module: RuGUI

Defined in:
lib/rugui.rb,
lib/rugui/version.rb,
lib/rugui/base_view.rb,
lib/rugui/base_model.rb,
lib/rugui/base_object.rb,
lib/rugui/gem_builder.rb,
lib/rugui/initializer.rb,
lib/rugui/log_support.rb,
lib/rugui/configuration.rb,
lib/rugui/plugin/loader.rb,
lib/rugui/gem_dependency.rb,
lib/rugui/signal_support.rb,
lib/rugui/base_controller.rb,
lib/rugui/base_view_helper.rb,
lib/rugui/initialize_hooks.rb,
lib/rugui/property_observer.rb,
lib/rugui/framework_adapters/GTK.rb,
lib/rugui/framework_adapters/GTK.rb,
lib/rugui/framework_adapters/Qt4.rb,
lib/rugui/framework_adapters/Qt4.rb,
lib/rugui/vendor_gem_source_index.rb,
lib/rugui/property_changed_support.rb,
lib/rugui/observable_property_proxy.rb,
lib/rugui/entity_registration_support.rb,
lib/rugui/framework_adapters/Rubygame.rb,
lib/rugui/framework_adapters/Rubygame.rb,
lib/rugui/framework_adapters/Rubygame.rb,
lib/rugui/observable_property_support.rb,
lib/rugui/generators/rugui/templates/config/boot.rb,
lib/rugui/framework_adapters/base_framework_adapter.rb,
lib/rugui/framework_adapters/framework_adapter_support.rb

Defined Under Namespace

Modules: EntityRegistrationSupport, FrameworkAdapters, InitializeHooks, LogSupport, ObservablePropertySupport, Plugin, PropertyChangedSupport, PropertyObserver, SignalSupport, VERSION Classes: BaseController, BaseImageSprite, BaseMainController, BaseModel, BaseObject, BaseView, BaseViewHelper, Boot, BuilderFileNotFoundError, Configuration, GemBoot, GemBuilder, GemDependency, Initializer, ObservablePropertyProxy, RootWidgetNotSetForIncludedView, RuGUILogger, VendorBoot, VendorGemSourceIndex

Class Method Summary collapse

Class Method Details

.boot!Object



10
11
12
13
14
15
# File 'lib/rugui/generators/rugui/templates/config/boot.rb', line 10

def boot!
  unless booted?
    preinitialize
    pick_boot.run
  end
end

.booted?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/rugui/generators/rugui/templates/config/boot.rb', line 17

def booted?
  defined? RuGUI::Initializer
end

.configurationObject

The Configuration instance used to configure the RuGUI environment



9
10
11
# File 'lib/rugui.rb', line 9

def configuration
  @@configuration
end

.configuration=(configuration) ⇒ Object



13
14
15
# File 'lib/rugui.rb', line 13

def configuration=(configuration)
  @@configuration = configuration
end

.pick_bootObject



21
22
23
# File 'lib/rugui/generators/rugui/templates/config/boot.rb', line 21

def pick_boot
  (vendor_rugui? ? VendorBoot : GemBoot).new
end

.preinitializeObject



29
30
31
# File 'lib/rugui/generators/rugui/templates/config/boot.rb', line 29

def preinitialize
  load(preinitializer_path) if File.exist?(preinitializer_path)
end

.preinitializer_pathObject



33
34
35
# File 'lib/rugui/generators/rugui/templates/config/boot.rb', line 33

def preinitializer_path
  "#{APPLICATION_ROOT}/config/preinitializer.rb"
end

.rootObject



17
18
19
20
21
22
23
# File 'lib/rugui.rb', line 17

def root
  if defined?(APPLICATION_ROOT)
    Pathname.new(File.expand_path(APPLICATION_ROOT))
  else
    nil
  end
end

.vendor_rugui?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/rugui/generators/rugui/templates/config/boot.rb', line 25

def vendor_rugui?
  File.exist?("#{APPLICATION_ROOT}/vendor/rugui")
end