Class: Cli

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions, Validator
Defined in:
lib/vvm-rb/cli.rb

Instance Method Summary collapse

Methods included from Validator

included

Instance Method Details

#install(version, *conf) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/vvm-rb/cli.rb', line 8

def install(version, *conf)
  installer(version, conf)

  print "\e[32m"
  puts "\nVim is successfully installed.  For daily use,\nplease add the following line into your ~/.bash_login etc:\n\ntest -f ~/.vvm-rb/etc/login && source ~/.vvm-rb/etc/login\n\n  EOS\n  print \"\\e[0m\"\nend\n"

#listObject



40
41
42
43
# File 'lib/vvm-rb/cli.rb', line 40

def list
  Installer.new('dummy').fetch
  puts Version.list
end

#rebuild(version, *conf) ⇒ Object



30
31
32
# File 'lib/vvm-rb/cli.rb', line 30

def rebuild(version, *conf)
  rebuilder(version, conf)
end

#reinstall(version, *conf) ⇒ Object



24
25
26
27
# File 'lib/vvm-rb/cli.rb', line 24

def reinstall(version, *conf)
  Uninstaller.new(version).uninstall
  installer(version, conf)
end

#uninstall(version) ⇒ Object



51
52
53
# File 'lib/vvm-rb/cli.rb', line 51

def uninstall(version)
  Uninstaller.new(version).uninstall
end

#use(version) ⇒ Object



35
36
37
# File 'lib/vvm-rb/cli.rb', line 35

def use(version)
  Switcher.new(version).use
end

#versionsObject



46
47
48
# File 'lib/vvm-rb/cli.rb', line 46

def versions
  puts Version.versions
end