るりまサーチ

最速Rubyリファレンスマニュアル検索!
1926件ヒット [401-500件を表示] (0.116秒)

別のキーワード

  1. shell/builtin-command new
  2. rubygems/command command
  3. irb/extend-command def_extend_command
  4. irb/extend-command install_extend_commands
  5. shell/builtin-command each

モジュール

キーワード

検索結果

<< < ... 3 4 5 6 7 ... > >>

IRB::ExtendCommand::IrbCommand#execute(*obj) -> IRB::Irb (6001.0)

新しいサブ irb インタプリタを起動します。

新しいサブ irb インタプリタを起動します。

@param obj 新しいサブ irb インタプリタで self にするオブジェクトを指定
します。省略した場合は irb を起動したときの main オブジェク
トを self にします。

Shell::CommandProcessor#system(command, *opts) -> Shell::SystemCommand (3236.0)

command を実行する.

...
command
を実行する.

@param command 実行するコマンドのパスを文字列で指定します。

@param opts command のオプションを文字列で指定します。複数可。

使用例:

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

print sh.system("ls", "-l")
S...
...hell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT...

Gem::CommandManager#[](command_name) -> Gem::Command | nil (3209.0)

引数で指定されたコマンド名に対応するクラスのインスタンスを返します。

...引数で指定されたコマンド名に対応するクラスのインスタンスを返します。

@param command_name コマンド名を文字列で指定します。...

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

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

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

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...

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

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

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

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...

絞り込み条件を変える

Gem::Command#defaults_str -> String (3007.0)

このメソッドはサブクラスで再定義されます。 コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。

...このメソッドはサブクラスで再定義されます。
コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。

@see Gem::Command#arguments...

Shell::CommandProcessor#cat(*files) -> Shell::Filter (3007.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...param files シェルコマンド cat に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(...

Shell::CommandProcessor#echo(*strings) -> Shell::Filter (3007.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

....

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(fi...

Shell::CommandProcessor#glob(pattern) -> Shell::Filter (3007.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...す。
パターンの書式については、Dir.[] を参照してください。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(f...

Shell::CommandProcessor#out(dev = STDOUT, &block) -> () (3007.0)

Shell#transact を呼び出しその結果を dev に出力します。

...ェクトなどで指定します。

@param block transact 内部で実行するシェルを指定します。


使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
File.open("out.txt", "w"){ |fp|
sh.out(fp) {
system("ls", "-l") | head("-n 3")
}
}...

絞り込み条件を変える

Shell::CommandProcessor#tee(file) -> Shell::Filter (3007.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...@param file シェルコマンドtee に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(...

Shell::CommandProcessor#transact { ... } -> object (3007.0)

ブロック中で shell を self として実行します。

...ブロック中で shell を self として実行します。

例:

require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
}...

Gem::Command#add_extra_args(args) -> Array (3001.0)

$HOME/.gemrc から読み込んだ引数を追加します。

$HOME/.gemrc から読み込んだ引数を追加します。

@param args 追加する引数を配列で指定します。

Gem::Command#add_option(*opts) {|value, options| ... } (3001.0)

コマンドに対するコマンドラインオプションとハンドラを追加します。

コマンドに対するコマンドラインオプションとハンドラを追加します。

ブロックには、コマンドライン引数の値とそのオプションが渡されます。
オプションはハッシュになっています。

@param opts オプションを指定します。

@see OptionParser#make_switch
<< < ... 3 4 5 6 7 ... > >>