ライブラリ
- ビルトイン (240)
-
net
/ smtp (36) - openssl (12)
- pathname (12)
-
rubygems
/ config _ file (12) - shell (30)
-
shell
/ builtin-command (6) -
shell
/ command-processor (30) -
shell
/ filter (30) - un (12)
- zlib (24)
クラス
-
Gem
:: ConfigFile (12) - IO (216)
-
Net
:: SMTP (36) - Object (12)
-
OpenSSL
:: Config (12) - Pathname (12)
- Shell (30)
-
Shell
:: CommandProcessor (30) -
Shell
:: Filter (30) -
Shell
:: Glob (6) -
Zlib
:: GzipWriter (24)
モジュール
- Enumerable (12)
- Kernel (12)
検索結果
先頭5件
-
IO
# each _ char {|c| . . . } -> self (6121.0) -
self に含まれる文字を一文字ずつブロックに渡して評価します。
...ません。
ブロックを省略した場合は各文字について繰り返す Enumerator を返します。
@raise IOError self が読み込み用にオープンされていない場合に発生します。
f = File.new("testfile")
f.each_char {|c| print c, ' ' } #=> #<File:testfile>... -
Shell
# foreach(path = nil , &block) -> () (6117.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
...ァイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
put... -
Shell
:: CommandProcessor # foreach(path = nil , &block) -> () (6117.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
...ァイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
put... -
Shell
:: Filter # foreach(path = nil , &block) -> () (6117.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
...ァイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
put... -
IO
# each _ byte -> Enumerator (6115.0) -
IO の現在位置から 1 バイトずつ読み込み、それを整数として与え、ブロックを実行します。
...み込みメソッドとして動作します。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
//emlist[例][ruby]{
IO.write("testfile", "aあ")
File.open("testfile") do |io|
io.each_byte { |x| p x }
# => 97
# 227
# 129
# 130
end
//}... -
IO
# each _ byte {|ch| . . . } -> self (6115.0) -
IO の現在位置から 1 バイトずつ読み込み、それを整数として与え、ブロックを実行します。
...み込みメソッドとして動作します。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
//emlist[例][ruby]{
IO.write("testfile", "aあ")
File.open("testfile") do |io|
io.each_byte { |x| p x }
# => 97
# 227
# 129
# 130
end
//}... -
IO
# each _ codepoint -> Enumerator (6115.0) -
IO の各コードポイントに対して繰り返しブロックを呼びだします。
...にはコードポイントを表す整数が渡されます。
ブロックを省略した場合には、Enumerator を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}... -
IO
# each _ codepoint {|c| . . . } -> self (6115.0) -
IO の各コードポイントに対して繰り返しブロックを呼びだします。
...にはコードポイントを表す整数が渡されます。
ブロックを省略した場合には、Enumerator を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}... -
Shell
# tee(file) -> Shell :: Filter (144.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...am 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... -
Shell
:: CommandProcessor # tee(file) -> Shell :: Filter (144.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...am 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... -
Shell
:: Filter # tee(file) -> Shell :: Filter (144.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...am 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... -
Shell
# cat(*files) -> Shell :: Filter (137.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...m 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...