Class: StdlibInstaller

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

Constant Summary collapse

PREFIX =
File.join(File.dirname(__FILE__), '..', 'repos', 'stdlib')

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, version) ⇒ StdlibInstaller

Returns a new instance of StdlibInstaller.



8
9
10
11
# File 'lib/stdlib_installer.rb', line 8

def initialize(path, version)
  self.path = File.expand_path(path)
  self.version = version
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/stdlib_installer.rb', line 6

def path
  @path
end

#versionObject

Returns the value of attribute version.



6
7
8
# File 'lib/stdlib_installer.rb', line 6

def version
  @version
end

Instance Method Details

#installObject



13
14
15
16
17
18
# File 'lib/stdlib_installer.rb', line 13

def install
  FileUtils.mkdir_p(File.join(PREFIX, version))
  install_exts
  install_libs
  install_core
end