aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-29 08:36:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-29 08:36:28 +0000
commit13dadf3f267e7c81907ae934e06abf75eaac80ee (patch)
tree436426c980dd405a96d4816ca9ac1ea49ad89e42 /lib
parentc31d06eeb7c9787870bad6bf62955310bb644f33 (diff)
downloadruby-13dadf3f267e7c81907ae934e06abf75eaac80ee.tar.gz
fileutils.rb: unify method definition style
* lib/fileutils.rb: Unify to coding-style for method definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/fileutils.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 748ebd7637..01b38ecda3 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1629,7 +1629,7 @@ module FileUtils
#
# p FileUtils.commands #=> ["chmod", "cp", "cp_r", "install", ...]
#
- def FileUtils.commands
+ def self.commands
OPT_TABLE.keys
end
@@ -1638,7 +1638,7 @@ module FileUtils
#
# p FileUtils.options #=> ["noop", "force", "verbose", "preserve", "mode"]
#
- def FileUtils.options
+ def self.options
OPT_TABLE.values.flatten.uniq.map {|sym| sym.to_s }
end
@@ -1649,7 +1649,7 @@ module FileUtils
# p FileUtils.have_option?(:rm, :force) #=> true
# p FileUtils.have_option?(:rm, :preserve) #=> false
#
- def FileUtils.have_option?(mid, opt)
+ def self.have_option?(mid, opt)
li = OPT_TABLE[mid.to_s] or raise ArgumentError, "no such method: #{mid}"
li.include?(opt)
end
@@ -1659,7 +1659,7 @@ module FileUtils
#
# p FileUtils.options_of(:rm) #=> ["noop", "verbose", "force"]
#
- def FileUtils.options_of(mid)
+ def self.options_of(mid)
OPT_TABLE[mid.to_s].map {|sym| sym.to_s }
end
@@ -1668,7 +1668,7 @@ module FileUtils
#
# p FileUtils.collect_method(:preserve) #=> ["cp", "cp_r", "copy", "install"]
#
- def FileUtils.collect_method(opt)
+ def self.collect_method(opt)
OPT_TABLE.keys.select {|m| OPT_TABLE[m].include?(opt) }
end