Class: SketchupExtension
- Inherits:
-
Object
- Object
- SketchupExtension
Overview
Metadata for a Ruby extension. The host loads the implementation in app/resources/Tools/modraup_extensions.rb at startup. Plugin code can require extensions.rb for compatibility. Pass the extension to ModraUp.register_extension to register it and optionally load it immediately.
Class Method Summary # collapse
Instance Method Summary # collapse
-
#check ⇒ Boolean
Check the extension. If not registered, ModraUp.require @path; if registered, call ModraUp.register_extension. Returns true if already loaded.
-
#uncheck ⇒ nil
Call ModraUp.register_extension(self, false) when registered to prevent automatic loading on the next startup. If not registered, it does nothing. The scripts executed in the current process will not be unloaded.
-
#loaded? ⇒ Boolean
Has the Ruby Sketchup extension already been require?
-
#load_on_start? ⇒ Boolean
Returns whether the extension loads automatically on startup (checked state in Extension Manager).
-
#registered? ⇒ Boolean
Has ModraUp.register_extension already been called.
-
#id ⇒ String
Extension ID. Can be read from the extension_info.txt in the plugin directory, with a default value of an empty string.
-
#version_id ⇒ String
Extension version ID. Can be read from the extension_info.txt in the plugin directory, defaulting to an empty string.
Class Method Details
SketchupExtension.new(name, load_path = nil) ⇒ extension
Instance Method Details
extension.check ⇒ Boolean
Check the extension. If not registered, ModraUp.require @path; if registered, call ModraUp.register_extension. Returns true if already loaded.
extension.uncheck ⇒ nil
Call ModraUp.register_extension(self, false) when registered to prevent automatic loading on the next startup. If not registered, it does nothing. The scripts executed in the current process will not be unloaded.
extension.loaded? ⇒ Boolean
Has the Ruby Sketchup extension already been require?
extension.load_on_start? ⇒ Boolean
Returns whether the extension loads automatically on startup (checked state in Extension Manager).
extension.registered? ⇒ Boolean
Has ModraUp.register_extension already been called.
extension.id ⇒ String
Extension ID. Can be read from the extension_info.txt in the plugin directory, with a default value of an empty string.
extension.version_id ⇒ String
Extension version ID. Can be read from the extension_info.txt in the plugin directory, defaulting to an empty string.