Class: Gloo::Verbs::Unload
- Inherits:
-
Core::Verb
- Object
- Core::Baseo
- Core::Verb
- Gloo::Verbs::Unload
- Defined in:
- lib/gloo/verbs/unload.rb
Constant Summary collapse
- KEYWORD =
'unload'.freeze
- KEYWORD_SHORT =
'u!'.freeze
Constants inherited from Core::Baseo
Core::Baseo::NOT_IMPLEMENTED_ERR
Instance Attribute Summary
Attributes inherited from Core::Verb
Attributes inherited from Core::Baseo
Class Method Summary collapse
-
.doc_data ⇒ Object
Get the verb's documentation data.
-
.keyword ⇒ Object
Get the Verb's keyword.
-
.keyword_shortcut ⇒ Object
Get the Verb's keyword shortcut.
Instance Method Summary collapse
-
#run ⇒ Object
Run the verb.
Methods inherited from Core::Verb
#display_value, help, inherited, #initialize, #type_display
Methods inherited from Core::Baseo
Constructor Details
This class inherits a constructor from Gloo::Core::Verb
Class Method Details
.doc_data ⇒ Object
Get the verb's documentation data.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/gloo/verbs/unload.rb', line 51 def self.doc_data { :name => KEYWORD, :shortcut => KEYWORD_SHORT, :description => 'Un-load all open files. Use the files ' \ 'command to see the list of files that will be un-loaded. ' \ 'The heap will be empty after this is run, so be sure to ' \ 'save state prior to executing.', :syntax => [ 'unload' ], :result => 'All objects will be unloaded from the heap.', :examples => <<~EXAMPLES.strip > unload EXAMPLES } end |
.keyword ⇒ Object
Get the Verb's keyword.
27 28 29 |
# File 'lib/gloo/verbs/unload.rb', line 27 def self.keyword return KEYWORD end |
.keyword_shortcut ⇒ Object
Get the Verb's keyword shortcut.
34 35 36 |
# File 'lib/gloo/verbs/unload.rb', line 34 def self.keyword_shortcut return KEYWORD_SHORT end |
Instance Method Details
#run ⇒ Object
Run the verb. This will unload all loaded objects and reset the engine state.
18 19 20 21 22 |
# File 'lib/gloo/verbs/unload.rb', line 18 def run return unless @engine.persist_man.maps @engine.persist_man.unload_all end |