class Gem::Installer::FakePackage - Documentation for Ruby 4.0
Description: Documentation for the Gem::Installer::FakePackage class
Keywords: ruby,class,Gem::Installer::FakePackage

🔍

No recent searches

# class Gem::Installer::FakePackage

### Attributes

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

### Public Class Methods

new (spec)
Source

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

### Public Instance Methods

copy_to (path)
Source

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

extract_files (destination_dir, pattern = "*")
Source

    # File lib/rubygems/installer.rb, line 102
    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