Sha256: 44011ca8988bbbee3361282fd4890683b09e0bd63576601dfac79aefa543b43a

Contents?: true

Size: 387 Bytes

Versions: 16

Compression:

Stored size: 387 Bytes

Contents

require 'fileutils'

class Switcher
  def initialize(version)
    @version = version
  end

  def use
    current = get_current_dir
    FileUtils.rm(current) if File.exists?(current)
    unless @version == 'system'
      vims_dir = get_vims_dir(@version)
      abort "#{@version} is not installed." unless File.exists?(vims_dir)
      FileUtils.ln_s(vims_dir, current)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
vvm-rb-0.1.6 lib/vvm-rb/switcher.rb
vvm-rb-0.1.5 lib/vvm-rb/switcher.rb
vvm-rb-0.1.4 lib/vvm-rb/switcher.rb
vvm-rb-0.1.3 lib/vvm-rb/switcher.rb
vvm-rb-0.1.2 lib/vvm-rb/switcher.rb
vvm-rb-0.1.1 lib/vvm-rb/switcher.rb
vvm-rb-0.1.0 lib/vvm-rb/switcher.rb
vvm-rb-0.0.15 lib/vvm-rb/switcher.rb
vvm-rb-0.0.14 lib/vvm-rb/switcher.rb
vvm-rb-0.0.13 lib/vvm-rb/switcher.rb
vvm-rb-0.0.12 lib/vvm-rb/switcher.rb
vvm-rb-0.0.11 lib/vvm-rb/switcher.rb
vvm-rb-0.0.10 lib/vvm-rb/switcher.rb
vvm-rb-0.0.9 lib/vvm-rb/switcher.rb
vvm-rb-0.0.8 lib/vvm-rb/switcher.rb
vvm-rb-0.0.7 lib/vvm-rb/switcher.rb