別のキーワード
ライブラリ
- ビルトイン (148)
- bigdecimal (24)
-
net
/ http (24) - objspace (36)
- open3 (24)
- rake (36)
-
rubygems
/ requirement (12) -
rubygems
/ source _ index (12) -
rubygems
/ specification (252) - shell (24)
-
shell
/ command-processor (24) -
shell
/ filter (48) - stringio (12)
- strscan (12)
-
webrick
/ httpstatus (24)
クラス
- BigDecimal (24)
- Exception (12)
-
Gem
:: Requirement (12) -
Gem
:: SourceIndex (12) -
Gem
:: Specification (252) - Method (12)
-
Rake
:: Application (12) - Shell (24)
-
Shell
:: CommandProcessor (24) -
Shell
:: Filter (48) - StringIO (12)
- StringScanner (12)
- UnboundMethod (12)
モジュール
- Enumerable (112)
- ObjectSpace (36)
- Open3 (24)
- Rake (24)
-
WEBrick
:: HTTPStatus (12)
キーワード
- HTTPNetworkAuthenticationRequired (12)
- HTTPProxyAuthenticationRequired (12)
- ProxyAuthenticationRequired (12)
-
RC
_ PROXY _ AUTHENTICATION _ REQUIRED (12) - Rubyの起動 (12)
-
add
_ dependency (12) -
add
_ development _ dependency (12) -
add
_ loader (12) -
add
_ runtime _ dependency (12) - all? (24)
-
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) - any? (24)
- application (12)
- application= (12)
-
attribute
_ alias _ singular (12) - autorequire (12)
- autorequire= (12)
-
backtrace
_ locations (12) - concat (24)
- each (6)
- echo (18)
-
find
_ name (12) - glob (18)
-
irb
/ xmp (12) -
lib
_ files (12) - none? (32)
- one? (32)
-
pipeline
_ rw (24) - rdoc (12)
-
require
_ path (12) -
require
_ path= (12) -
require
_ paths (12) -
require
_ paths= (12) -
required
_ attribute (12) -
required
_ attribute? (12) -
required
_ attributes (12) -
required
_ ruby _ version (12) -
required
_ ruby _ version= (12) -
required
_ rubygems _ version (12) -
required
_ rubygems _ version= (12) - requirements (12)
- requirements= (12)
-
ruby 1
. 6 feature (12) -
satisfies
_ requirement? (12) - shell (6)
-
source
_ location (24) - tee (18)
-
to
_ a (6) -
to
_ s (6) -
trace
_ object _ allocations (12) - truncate (36)
- tsort (12)
- | (6)
- 制御構造 (9)
検索結果
先頭5件
-
Enumerable
# any?(pattern) -> bool (12.0) -
すべての要素が偽である場合に false を返します。 真である要素があれば、ただちに true を返します。
...=== item を評価します。
//emlist[例][ruby]{
require 'set'
p Set[1, 2, 3].any? {|v| v > 3 } # => false
p Set[1, 2, 3].any? {|v| v > 1 } # => true
p Set[].any? {|v| v > 0 } # => false
p Set['ant', 'bear', 'cat'].any?(/d/) # => false
p Set[nil, true, 99].any?... -
Shell
# echo(*strings) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ンド 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(file + ".tee") >> "all.tee"
}... -
Shell
# glob(pattern) -> Shell :: Filter (12.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(file + ".tee") >> "all.tee"... -
Shell
# tee(file) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...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 # echo(*strings) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ンド 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(file + ".tee") >> "all.tee"
}... -
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (12.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(file + ".tee") >> "all.tee"... -
Shell
:: CommandProcessor # tee(file) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...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 # each(rs = nil) -> () (12.0) -
フィルタの一行ずつをblockに渡します。
...行ずつをblockに渡します。
@param rs レコードセパレーターを表す文字列を指定します。
nil ならば、Shell.record_separatorの値が使用されます。
使用例
require 'shell'
sh = Shell.new
sh.cat("/etc/passwd").each { |line|
puts line
}... -
Shell
:: Filter # echo(*strings) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ンド 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(file + ".tee") >> "all.tee"
}... -
Shell
:: Filter # glob(pattern) -> Shell :: Filter (12.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(file + ".tee") >> "all.tee"... -
Shell
:: Filter # tee(file) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...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 # to _ a -> [String] (12.0) -
実行結果を文字列の配列で返します。
...実行結果を文字列の配列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
puts sh.cat("/etc/passwd").to_a... -
Shell
:: Filter # to _ s -> String (12.0) -
実行結果を文字列で返します。
...実行結果を文字列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
}... -
制御構造 (12.0)
-
制御構造 条件分岐: * if * unless * case 繰り返し: * while * until * for * break * next * redo * retry 例外処理: * raise * begin その他: * return * BEGIN * END
...引数を指定した場合はループの戻り値はその引数になります。
====[a:next] next
//emlist[例][ruby]{
# 空行を捨てるcat
ARGF.each_line do |line|
next if line.strip.empty?
print line
end
//}
文法:
next
next val
nextはもっとも内側の......が省略された場合には nil を戻り値とします。
トップレベルで return した場合はプログラムが終了します。
require, load されたファイル内のトップレベルで return した場合は呼び出し元に返ります。
====[a:BEGIN] BEGIN
//emlist[例][...