Class: Rbenv

Inherits:
Passenger show all
Defined in:
lib/exogenesis/passengers/rbenv.rb

Overview

Manages the Ruby Version Manager Rbenv and the ruby installer ruby-build

Instance Method Summary collapse

Methods inherited from Passenger

by_name, emoji_name, #initialize, needs, register_as, with_emoji

Constructor Details

This class inherits a constructor from Passenger

Instance Method Details

#downObject



19
20
21
# File 'lib/exogenesis/passengers/rbenv.rb', line 19

def down
  execute_interactive 'Teardown', 'rm -r ~/.rbenv'
end

#upObject



9
10
11
12
13
14
15
16
17
# File 'lib/exogenesis/passengers/rbenv.rb', line 9

def up
  if command_exists? 'rbenv'
    update_rbenv
  else
    install_rbenv
  end
  rubies.each { |ruby| install_ruby ruby }
  execute 'Rehash', 'rbenv rehash'
end