class Mysh::Keeper
The keeper of mysh variable values.
Public Class Methods
new(value="")
click to toggle source
Set up this variable
# File lib/mysh/shell_variables/shell_variable_keeper.rb, line 10 def initialize(value="") @value = value end
Public Instance Methods
get_source()
click to toggle source
Get the source code of this variable.
# File lib/mysh/shell_variables/shell_variable_keeper.rb, line 25 def get_source @value end
get_value(loop_check={})
click to toggle source
Get the value of this variable.
# File lib/mysh/shell_variables/shell_variable_keeper.rb, line 15 def get_value(loop_check={}) my_id = self.object_id fail "Mysh variable looping error." if loop_check[my_id] loop_check[my_id] = self @value.preprocess ensure loop_check.delete(my_id) end
set_value(value)
click to toggle source
Set the value of this variable.
# File lib/mysh/shell_variables/shell_variable_keeper.rb, line 30 def set_value(value) @value = value end