diff options
Diffstat (limited to 'lib/shell/command-processor.rb')
-rw-r--r-- | lib/shell/command-processor.rb | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb index 38e38151fa..fa253b3705 100644 --- a/lib/shell/command-processor.rb +++ b/lib/shell/command-processor.rb @@ -65,14 +65,14 @@ class Shell # CommandProcessor#expand_path(path) # path: String # return: String - # pwdからみた絶対パスを返す + # returns the absolute path for <path> # def expand_path(path) @shell.expand_path(path) end # - # File関連コマンド + # File related commands # Shell#foreach # Shell#open # Shell#unlink @@ -87,7 +87,7 @@ class Shell # Same as: # File#foreach (when path is file) # Dir#foreach (when path is directory) - # pathはpwdからの相対パスになる + # path is relative to pwd # def foreach(path = nil, *rs) path = "." unless path @@ -108,7 +108,7 @@ class Shell # Same as: # File#open (when path is file) # Dir#open (when path is directory) - # modeはpathがファイルの時だけ有効 + # mode has an effect only when path is a file # def open(path, mode) path = expand_path(path) @@ -181,7 +181,7 @@ class Shell alias [] test # - # Dir関連メソッド + # Dir related methods # # Shell#mkdir # Shell#rmdir @@ -454,18 +454,11 @@ class Shell # # CommandProcessor.install_system_commands(pre) # pre: String - command name prefix - # define CommandProcessor.command() from all command of - # default_system_path. If a method exists, and names of it and - # the target command are the same, the method is not defined. - # Default action prefix "sys_" to the method name. The character - # which is not forgiven as a method name (when the first char is - # alphabet or char is alpha-numeric) converts into ``_''. A - # definition error is ignored. - # (Meaning same in Japanese: default_system_path上にのるコマンドを定 - # 義する. すでに同名のメソッドが存在する時は, 定義を行なわない. デ - # フォルトでは, 全てのメソッドには接頭子"sys_"をつける. メソッド名 - # として許されないキャラクタ(英数時以外とメソッド名の先頭が数値に - # なる場合)は, 強制的に``_''に変換する. 定義エラーは無視する.) + # defines every command which belongs in default_system_path via + # CommandProcessor.command(). It doesn't define already defined + # methods twice. By default, "pre_" is prefixes to each method + # name. Characters that may not be used in a method name are + # all converted to '_'. Definition errors are just ignored. # def self.install_system_commands(pre = "sys_") defined_meth = {} |