Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > shellライブラリ > Shellクラス > undef_system_command

singleton method Shell.undef_system_command

undef_system_command(command) -> Shell::CommandProcessor

commandを削除します.

[PARAM] command:
削除するコマンドの文字列を指定します。

動作例:

Shell.def_system_command("ls")
# ls を定義
Shell.undef_system_command("ls")
# ls を 削除

sh = Shell.new
begin
  sh.transact {
    ls("-l").each {|l|
      puts l
    }
  }
rescue NameError => err
  puts err
end
class Shell