780件ヒット
[701-780件を表示]
(0.261秒)
ライブラリ
クラス
-
ARGF
. class (48) - Addrinfo (24)
- Array (72)
- CGI (12)
- CSV (24)
-
CSV
:: Table (24) - ERB (24)
-
File
:: Stat (24) -
Gem
:: Requirement (12) - IO (60)
- Integer (96)
-
JSON
:: Parser (12) - Module (12)
-
Net
:: HTTP (96) - Object (48)
-
OpenSSL
:: BN (12) - Range (24)
- Socket (12)
- String (24)
- StringIO (36)
-
URI
:: MailTo (24)
モジュール
- Enumerable (60)
キーワード
- <=> (12)
- [] (24)
- chunk (12)
-
close
_ write (12) - connect (12)
-
connect
_ from (24) - cycle (36)
-
def
_ class (12) -
def
_ module (12) - downto (24)
- each (48)
-
each
_ char (24) -
each
_ codepoint (24) -
each
_ entry (24) - fdatasync (12)
- fetch (36)
-
force
_ quotes? (12) - get2 (24)
- header (12)
-
initialize
_ copy (12) -
inplace
_ mode (12) -
inplace
_ mode= (12) -
instance
_ method (12) - post2 (24)
-
pretty
_ print (36) -
pretty
_ print _ cycle (12) - printf (12)
- puts (12)
- reopen (24)
-
request
_ get (24) -
request
_ post (24) -
reverse
_ each (24) - size? (12)
- source (12)
- times (24)
-
to
_ mailtext (12) -
to
_ rfc822text (12) -
to
_ s (12) - upto (24)
検索結果
先頭5件
-
Enumerable
# cycle(n=nil) {|obj| . . . } -> object | nil (119.0) -
Enumerable オブジェクトの各要素を n 回 or 無限回(n=nil)繰り返し ブロックを呼びだします。
...//emlist[例][ruby]{
a = ["a", "b", "c"]
a.cycle {|x| puts x } # print, a, b, c, a, b, c,.. forever.
a.cycle(2) {|x| puts x } # print, a, b, c, a, b, c.
//}
ブロックを省略した場合は、n 回 or 無限回 enum の各要素を
繰り返す Enumerator を返します。
@return ブロ......ックを指定しなかった場合は、Enumerator を返します。
レシーバが空の場合は nil を返します。... -
Array
# cycle(n=nil) -> Enumerator (113.0) -
配列の全要素を n 回(nilの場合は無限に)繰り返しブロックを呼びだします。
...省略した場合は Enumerator を返します。
@param n 繰り返したい回数を整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外......の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = ["a", "b", "c"]
a.cycle {|x| puts x } # print, a, b, c, a, b, c,.. forever.
//}... -
Array
# reverse _ each -> Enumerator (113.0) -
各要素に対して逆順にブロックを評価します。
...て逆順にブロックを評価します。
ブロックが与えられなかった場合は、自身と reverse_each から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
a = [ "a", "b", "c" ]
a.reverse_each {|x| print x, " " }
# => c b a
//}
@see Array#each... -
Array
# reverse _ each {|item| . . . } -> self (113.0) -
各要素に対して逆順にブロックを評価します。
...て逆順にブロックを評価します。
ブロックが与えられなかった場合は、自身と reverse_each から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
a = [ "a", "b", "c" ]
a.reverse_each {|x| print x, " " }
# => c b a
//}
@see Array#each... -
IO
# reopen(path) -> self (113.0) -
path で指定されたファイルにストリームを繋ぎ換えます。
...path で指定されたファイルにストリームを繋ぎ換えます。
第二引数を省略したとき self のモードをそのまま引き継ぎます。
IO#pos, IO#lineno などはリセットされます。
@param path パスを表す文字列を指定します。
@param mode パ......ist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\n")
f1 = File.new("testfile", "a+")
f2 = File.new("testfile")
f1.print("This is line three\n")
f2.readlines # => ["This is line one\n", "This is line two\n"]
f1.close
f2.reopen("testfile", "r") # => #<File:testf......ile>
f2.readlines # => ["This is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}
@see Kernel.#open... -
IO
# reopen(path , mode) -> self (113.0) -
path で指定されたファイルにストリームを繋ぎ換えます。
...path で指定されたファイルにストリームを繋ぎ換えます。
第二引数を省略したとき self のモードをそのまま引き継ぎます。
IO#pos, IO#lineno などはリセットされます。
@param path パスを表す文字列を指定します。
@param mode パ......ist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\n")
f1 = File.new("testfile", "a+")
f2 = File.new("testfile")
f1.print("This is line three\n")
f2.readlines # => ["This is line one\n", "This is line two\n"]
f1.close
f2.reopen("testfile", "r") # => #<File:testf......ile>
f2.readlines # => ["This is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}
@see Kernel.#open... -
JSON
:: Parser # source -> String (113.0) -
現在のソースのコピーを返します。
...//emlist[例][ruby]{
require 'json'
parser = JSON::Parser.new(DATA.read)
print parser.source
# => {
# => "Tanaka": {
# => "name":"tanaka",
# => "age":20
# => },
# => "Suzuki": {
# => "name":"suzuki",
# => "age":25
# => }
# => }
__END__
{
"Tanaka": {
"name":"tanaka",...