Class: RVM
- Inherits:
-
Object
- Object
- RVM
- Defined in:
- lib/rvm.rb
Class Method Summary collapse
Class Method Details
.cleanup ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rvm.rb', line 16 def cleanup ('RVM') if run? begin PTY.spawn('rvm cleanup all') do |stdin, _stdout, _stderr, _thread| begin stdin.each { |line| print line.indent(2) } rescue Errno::EIO end end rescue PTY::ChildExited puts 'The child process exited!' end else puts ' - Skipped.'.colorize(:red) end break_output end |
.installed? ⇒ Boolean
3 4 5 |
# File 'lib/rvm.rb', line 3 def installed? File.exist? File.('~/.rvm') end |
.update ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rvm.rb', line 7 def update ('RVM') result, _cmd = Open3.capture2e('rvm get stable') puts ' - RVM updated.'.colorize(:green) if result.include?('RVM reloaded') break_output end |