Class: RubyAutoInstaller::Managers::Asdf

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_auto_installer/managers/asdf.rb

Class Method Summary collapse

Class Method Details

.all_versionsObject



13
14
15
# File 'lib/ruby_auto_installer/managers/asdf.rb', line 13

def self.all_versions
  `asdf list-all ruby`.lines
end

.install(version) ⇒ Object



21
22
23
# File 'lib/ruby_auto_installer/managers/asdf.rb', line 21

def self.install(version)
  system("asdf install ruby #{version}")
end

.installed_versionsObject



17
18
19
# File 'lib/ruby_auto_installer/managers/asdf.rb', line 17

def self.installed_versions
  `asdf list ruby`.lines
end

.present?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/ruby_auto_installer/managers/asdf.rb', line 4

def self.present?
  system("asdf --version")
end

.refreshObject



25
26
# File 'lib/ruby_auto_installer/managers/asdf.rb', line 25

def self.refresh
end

.updateObject



8
9
10
11
# File 'lib/ruby_auto_installer/managers/asdf.rb', line 8

def self.update
  `asdf update`
  `asdf plugin-update ruby`
end