るりまサーチ

最速Rubyリファレンスマニュアル検索!
105件ヒット [1-100件を表示] (0.157秒)

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l matrix

ライブラリ

キーワード

検索結果

<< 1 2 > >>

String#chomp!(rs = $/) -> self | nil (18237.0)

self の末尾から rs で指定する改行コードを取り除きます。 ただし rs が "\n" ($/ のデフォルト値) のときは、 実行環境によらず "\r", "\r\n", "\n" のすべてを改行コードとみなして取り除きます。

...self の末尾から rs で指定する改行コードを取り除きます。
ただし rs が "\n" ($/ のデフォルト値) のときは、
実行環境によらず "\r", "\r\n", "\n" のすべてを改行コードとみなして取り除きます。

rs に nil を指定した場合、この...
...@return chomp! は通常 self を返しますが、取り除く改行がなかった場合は nil を返します。

//emlist[例][ruby]{
buf = "string\n"
buf.chomp! # => nil
p buf # => "string"

$/ = "\n" # デフォルトと同じ
p "foo\r".chomp! # => "foo"
p "foo\r\n".chomp! # =>...
..."foo"
p "foo\n".chomp! # => "foo"
p "foo\n\r".chomp! # => "foo\n"

buf = "string\n"
buf.chomp!(nil) # => nil
p buf # => "string\n"

p "foo\r\n\n".chomp!("") # => "foo"
p "foo\n\r\n".chomp!("") # => "foo"
p "foo\n\r\r".chomp!("") # => nil
//}

@see String#chomp
@see String#chop!...
...".chomp! # => "foo"
p "foo\n\r".chomp! # => "foo\n"

buf = "string\n"
buf.chomp!(nil) # => nil
p buf # => "string\n"

p "foo\r\n\n".chomp!("") # => "foo"
p "foo\n\r\n".chomp!("") # => "foo"
p "foo\n\r\r".chomp!("") # => nil
//}

@see String#chomp
@see String#chop!
@see String#dele...

Zlib::GzipReader#lineno=(num) (9131.0)

IO クラスの同名メソッドIO#lineno=と同じです。

...IO クラスの同名メソッドIO#lineno=と同じです。

但し、gzip ファイル中に
エラーがあった場合 Zlib::Error 例外や
Zlib::GzipFile::Error 例外が発生します。

gzip ファイルのフッターの処理に注意して下さい。
gzip ファイルのフッター...
...合は
Zlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError,
Zlib::GzipFile::LengthError 例外を発生させます。

* EOF (圧縮データの最後) を越えて読み込み要求を受けた時。
すなわち Zlib::GzipReader#read,
Zlib::GzipReader#gets メソッド等が nil を返...
...、Zlib::GzipFile#close メソッドが
呼び出された時。
* EOF まで読み込んだ後、Zlib::GzipReader#unused メソッドが
呼び出された時。

@param num 新たな行番号を整数で指定します。

@raise Zlib::Error Zlib::Error を参照
@raise Zlib::GzipFile::E...

Zlib::GzipReader#lineno -> Integer (9125.0)

IO クラスの同名メソッドIO#linenoと同じです。

...IO クラスの同名メソッドIO#linenoと同じです。

但し、gzip ファイル中に
エラーがあった場合 Zlib::Error 例外や
Zlib::GzipFile::Error 例外が発生します。

gzip ファイルのフッターの処理に注意して下さい。
gzip ファイルのフッターに...
...合は
Zlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError,
Zlib::GzipFile::LengthError 例外を発生させます。

* EOF (圧縮データの最後) を越えて読み込み要求を受けた時。
すなわち Zlib::GzipReader#read,
Zlib::GzipReader#gets メソッド等が nil を返...
...、Zlib::GzipFile#close メソッドが
呼び出された時。
* EOF まで読み込んだ後、Zlib::GzipReader#unused メソッドが
呼び出された時。

@raise Zlib::Error Zlib::Error を参照
@raise Zlib::GzipFile::Error Zlib::GzipFile::Errorを参照
@raise Zlib::GzipFile::No...

Shell#glob(pattern) -> Shell::Filter (6119.0)

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

...Filter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。

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

@see Dir.[]...

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

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

...Filter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。

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

@see Dir.[]...

絞り込み条件を変える

Shell::Filter#glob(pattern) -> Shell::Filter (6119.0)

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

...Filter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。

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

@see Dir.[]...

Shell#cat(*files) -> Shell::Filter (3119.0)

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

...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(file + ".tee") >> "all.tee"
}
}
}...

Shell#echo(*strings) -> Shell::Filter (3119.0)

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

...lter オブジェクトを返します.

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

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

Shell#tee(file) -> Shell::Filter (3119.0)

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

...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(file + ".tee") >> "all.tee"
}
}
}...

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

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

...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(file + ".tee") >> "all.tee"
}
}
}...

絞り込み条件を変える

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

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

...lter オブジェクトを返します.

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

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

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

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

...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(file + ".tee") >> "all.tee"
}
}
}...

Shell::Filter#cat(*files) -> Shell::Filter (3119.0)

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

...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(file + ".tee") >> "all.tee"
}
}
}...

Shell::Filter#echo(*strings) -> Shell::Filter (3119.0)

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

...lter オブジェクトを返します.

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

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

Shell::Filter#tee(file) -> Shell::Filter (3119.0)

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

...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(file + ".tee") >> "all.tee"
}
}
}...

絞り込み条件を変える

<< 1 2 > >>