Class: Rbenv

Inherits:
Object
  • Object
show all
Defined in:
lib/rbenv.rb

Class Method Summary collapse

Class Method Details

.installed?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/rbenv.rb', line 3

def installed?
  File.exist? File.expand_path('~/.rbenv')
end

.updateObject



7
8
9
10
11
12
13
# File 'lib/rbenv.rb', line 7

def update
  check_update_message('rbenv')
  Open3.popen3('cd ~/.rbenv && git pull && cd plugins/ruby-build/ && git pull') do |stdin, stdout, stderr, thread|
    puts '  - rbenv updated.'.colorize(:green)
  end
  break_output
end