Method: Mysh::VarsCommand#do_command

Defined in:
lib/mysh/internal/vars.rb

#do_commandObject

Do the actual work here.



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/mysh/internal/vars.rb', line 34

def do_command
  sym = @var_name.to_sym if @var_name

  if @value
    MNV[sym] = @value
  elsif @equals
    MNV[sym] = ""
  elsif @var_name
    puts "$#{@var_name} = #{MNV.get_source(sym)}"
  else
    show_all_values
  end
end