class Gem::Installer::FakePackage

属性

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

公共类方法

new(spec) 点击切换源代码
# File rubygems/installer.rb, line 118
def initialize(spec)
  @spec = spec
end

公共实例方法

copy_to(path) 点击切换源代码
# File rubygems/installer.rb, line 135
def copy_to(path)
end
extract_files(destination_dir, pattern = "*") 点击切换源代码
# File rubygems/installer.rb, line 122
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