るりまサーチ

最速Rubyリファレンスマニュアル検索!
30件ヒット [1-30件を表示] (0.007秒)
トップページ > クエリ:begin[x] > クラス:Shell[x]

別のキーワード

  1. _builtin begin
  2. range begin
  3. matchdata begin
  4. arithmeticsequence begin

ライブラリ

キーワード

検索結果

Shell#[](command, file1, file2 = nil) -> bool | Time | Integer | nil (7.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...ルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell
.verbose = false
sh = Shell.new
begin

sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo...

Shell#mkdir(*path) -> Array (7.0)

Dir.mkdirと同じです。 (複数可)

...ram path 作成するディレクトリ名を文字列で指定します。

@return 作成するディレクトリの一覧の配列を返します。

使用例
require 'shell'
Shell
.verbose = false
sh = Shell.new
begin

p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end...

Shell#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (7.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...ルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell
.verbose = false
sh = Shell.new
begin

sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo...

Shell.unalias_command(alias) -> () (7.0)

commandのaliasを削除します.

...例。
require 'shell'
Shell
.def_system_command("ls")
Shell
.alias_command("lsla", "ls", "-a", "-l")
Shell
.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}
Shell
.unalias_command("lsla")
begin

Shell
.unalias_command("...

Shell.undef_system_command(command) -> Shell::CommandProcessor (7.0)

commandを削除します.

...削除するコマンドの文字列を指定します。

動作例:
require 'shell'
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...

絞り込み条件を変える