Class: Gem::Installer::FakePackage
- Inherits:
- 
      Object
      
        - Object
- Gem::Installer::FakePackage
 
- Defined in:
- lib/rubygems/installer.rb
Instance Attribute Summary collapse
- 
  
    
      #data_mode  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute data_mode. 
- 
  
    
      #dir_mode  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute dir_mode. 
- 
  
    
      #prog_mode  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute prog_mode. 
- 
  
    
      #spec  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute spec. 
Instance Method Summary collapse
- #copy_to(path) ⇒ Object
- #extract_files(destination_dir, pattern = "*") ⇒ Object
- 
  
    
      #initialize(spec)  ⇒ FakePackage 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of FakePackage. 
Constructor Details
#initialize(spec) ⇒ FakePackage
Returns a new instance of FakePackage.
| 118 119 120 | # File 'lib/rubygems/installer.rb', line 118 def initialize(spec) @spec = spec end | 
Instance Attribute Details
#data_mode ⇒ Object
Returns the value of attribute data_mode.
| 116 117 118 | # File 'lib/rubygems/installer.rb', line 116 def data_mode @data_mode end | 
#dir_mode ⇒ Object
Returns the value of attribute dir_mode.
| 114 115 116 | # File 'lib/rubygems/installer.rb', line 114 def dir_mode @dir_mode end | 
#prog_mode ⇒ Object
Returns the value of attribute prog_mode.
| 115 116 117 | # File 'lib/rubygems/installer.rb', line 115 def prog_mode @prog_mode end | 
#spec ⇒ Object
Returns the value of attribute spec.
| 112 113 114 | # File 'lib/rubygems/installer.rb', line 112 def spec @spec end | 
Instance Method Details
#copy_to(path) ⇒ Object
| 135 136 | # File 'lib/rubygems/installer.rb', line 135 def copy_to(path) end | 
#extract_files(destination_dir, pattern = "*") ⇒ Object
| 122 123 124 125 126 127 128 129 130 131 132 133 | # File 'lib/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 |