In Files

  • rubygems/package.rb

Parent

Class/Module Index [+]

Quicksearch

Gem::FileOperations

Wrapper for FileUtils meant to provide logging and additional operations if needed.

Public Class Methods

new(logger = nil) click to toggle source
 
               # File rubygems/package.rb, line 21
def initialize(logger = nil)
  @logger = logger
end
            

Public Instance Methods

method_missing(meth, *args, &block) click to toggle source
 
               # File rubygems/package.rb, line 25
def method_missing(meth, *args, &block)
  case
  when FileUtils.respond_to?(meth)
    @logger.log "#{meth}: #{args}" if @logger
    FileUtils.send meth, *args, &block
  when Gem::FileOperations.respond_to?(meth)
    @logger.log "#{meth}: #{args}" if @logger
    Gem::FileOperations.send meth, *args, &block
  else
    super
  end
end