1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fileutils.rb: reduce private

* lib/fileutils.rb (Verbose, NoWrite, DryRun): make overridden
  methods private by each one calls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-02-29 08:36:30 +00:00
parent 6b3e5bb061
commit efa39c3dbd

View file

@ -1690,14 +1690,15 @@ module FileUtils
include FileUtils
@fileutils_output = $stderr
@fileutils_label = ''
::FileUtils.collect_method(:verbose).each do |name|
names = ::FileUtils.collect_method(:verbose)
names.each do |name|
module_eval(<<-EOS, __FILE__, __LINE__ + 1)
def #{name}(*args)
super(*fu_update_option(args, :verbose => true))
end
private :#{name}
EOS
end
private(*names)
extend self
class << self
public(*::FileUtils::METHODS)
@ -1714,14 +1715,15 @@ module FileUtils
include LowMethods
@fileutils_output = $stderr
@fileutils_label = ''
::FileUtils.collect_method(:noop).each do |name|
names = ::FileUtils.collect_method(:noop)
names.each do |name|
module_eval(<<-EOS, __FILE__, __LINE__ + 1)
def #{name}(*args)
super(*fu_update_option(args, :noop => true))
end
private :#{name}
EOS
end
private(*names)
extend self
class << self
public(*::FileUtils::METHODS)
@ -1739,14 +1741,15 @@ module FileUtils
include LowMethods
@fileutils_output = $stderr
@fileutils_label = ''
::FileUtils.collect_method(:noop).each do |name|
names = ::FileUtils.collect_method(:noop)
names.each do |name|
module_eval(<<-EOS, __FILE__, __LINE__ + 1)
def #{name}(*args)
super(*fu_update_option(args, :noop => true, :verbose => true))
end
private :#{name}
EOS
end
private(*names)
extend self
class << self
public(*::FileUtils::METHODS)