Sha256: 73a60896b0e2312be66bcc4b15c116a31f3a5e568ec13b545dcb91ef8e922f6a

Contents?: true

Size: 395 Bytes

Versions: 9

Compression:

Stored size: 395 Bytes

Contents

require 'fileutils'

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vvm-rb-1.1.1 lib/vvm/switcher.rb
vvm-rb-1.1.0 lib/vvm/switcher.rb
vvm-rb-1.0.8 lib/vvm/switcher.rb
vvm-rb-1.0.7 lib/vvm/switcher.rb
vvm-rb-1.0.6 lib/vvm/switcher.rb
vvm-rb-1.0.5 lib/vvm/switcher.rb
vvm-rb-1.0.4 lib/vvm/switcher.rb
vvm-rb-1.0.3 lib/vvm/switcher.rb
vvm-rb-1.0.2 lib/vvm/switcher.rb