Skip to Content Skip to Search
Methods
C
E
N

Attributes

[RW] data_mode
[RW] dir_mode
[RW] prog_mode
[RW] spec

Class Public methods

new(spec)

# File ruby/lib/rubygems/installer.rb, line 125
def initialize(spec)
  @spec = spec
end

Instance Public methods

copy_to(path)

# File ruby/lib/rubygems/installer.rb, line 142
def copy_to(path)
end

extract_files(destination_dir, pattern = "*")

# File ruby/lib/rubygems/installer.rb, line 129
def extract_files(destination_dir, pattern = "*")
  FileUtils.mkdir_p destination_dir

  spec.files.each do |file|
    file = File.join destination_dir, file
    next if File.exist? file
    FileUtils.mkdir_p File.dirname(file)
    File.open file, "w" do |fp|
      fp.puts "# #{file}"
    end
  end
end