Method: FileUtils.collect_method

Defined in:
lib/fileutils.rb

.collect_method(opt) ⇒ Object

Returns an array of the string method names of the methods that accept the given keyword option opt; the argument must be a symbol:

FileUtils.collect_method(:preserve) # => ["cp", "copy", "cp_r", "install"]


2611
2612
2613
# File 'lib/fileutils.rb', line 2611

def self.collect_method(opt)
  OPT_TABLE.keys.select {|m| OPT_TABLE[m].include?(opt) }
end