Class: MM::Console::SimpleCommand::RuntimeVariables
- Inherits:
-
Object
- Object
- MM::Console::SimpleCommand::RuntimeVariables
- Includes:
- Base
- Defined in:
- lib/mm/console/simple_command/runtime_variables.rb
Defined Under Namespace
Classes: Value
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Base
Class Method Details
.doc(runtime) ⇒ Object
23 24 25 |
# File 'lib/mm/console/simple_command/runtime_variables.rb', line 23 def self.doc(runtime) "show existed runtime variables\n How to set a variable? example: fixed = 'complete fix'\n How to unset a variable? example: fixed = ''\n MM stores most of stuff as variables so that you can easily access them." end |
.keys ⇒ Object
19 20 21 |
# File 'lib/mm/console/simple_command/runtime_variables.rb', line 19 def self.keys ['variables', 'v'] end |
Instance Method Details
#execute(runtime) ⇒ Object
27 28 29 30 |
# File 'lib/mm/console/simple_command/runtime_variables.rb', line 27 def execute(runtime) names = runtime.keys.sort_by{|n|n.to_s} runtime[:list] = SelectingList.new(names, Value) end |