456件ヒット
[401-456件を表示]
(0.105秒)
ライブラリ
クラス
- Array (12)
-
CSV
:: Table (24) - DBM (12)
- Enumerator (36)
- GDBM (12)
- Hash (60)
- IPSocket (12)
- MatchData (12)
-
Matrix
:: EigenvalueDecomposition (12) - Regexp (24)
- SDBM (12)
- Struct (12)
- TCPServer (24)
- UDPSocket (12)
-
Win32
:: Registry (84)
モジュール
-
CGI
:: HtmlExtension (96)
キーワード
- [] (12)
- accept (12)
- addr (12)
-
checkbox
_ group (24) -
descriptor
_ length (12) - each (24)
- eigenvalues (12)
- keys (12)
- match (24)
-
max
_ key _ length (12) -
max
_ value _ length (12) -
max
_ value _ name _ length (12) -
next
_ values (12) -
num
_ keys (12) -
num
_ values (12) - peek (12)
-
peek
_ values (12) -
radio
_ group (24) -
recvfrom
_ nonblock (12) -
scrolling
_ list (24) - sysaccept (12)
-
to
_ a (12) -
values
_ at (84) - wtime (12)
検索結果
先頭5件
-
CSV
:: Table # each {|column _ name , values| . . . } -> self (120.0) -
デフォルトのミックスモードかロウモードでは、行単位で繰り返します。カラ ムモードでは、ブロックに列名と対応する値の配列を与え、列単位で繰り返し ます。
...["row2_1", "row2_2"])
row3 = CSV::Row.new(["header1", "header2"], ["row3_1", "row3_2"])
table = CSV::Table.new([row1, row2, row3])
table.each { |row| p row }
# => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
# => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
# => #<CSV::Row "header1":"row3......_1", "row2_2"])
row3 = CSV::Row.new(["header1", "header2"], ["row3_1", "row3_2"])
table = CSV::Table.new([row1, row2, row3])
table.by_col!
table.each { |column_name, values| print column_name, values, "\n" }
# => header1["row1_1", "row2_1", "row3_1"]
# => header2["row1_2", "row2_2", "row3_2"]
//}... -
Hash
# [](key) -> object | nil (31.0) -
key に関連づけられた値を返します。
...さい。
@param key 探索するキーを指定します。
//emlist[例][ruby]{
h = {:ab => "some" , :cd => "all"}
p h[:ab] #=> "some"
p h[:ef] #=> nil
h1 = Hash.new("default value")
p h1[:non] #=> "default value"
h2 = Hash.new {|*arg| arg}
p h2[:non]......#=> [{}, :non]
//}
@see Hash.new, Hash#fetch,Hash#values_at,Hash#key?, Hash#default, Hash#default_proc... -
CSV
:: Table # each {|row| . . . } -> self (20.0) -
デフォルトのミックスモードかロウモードでは、行単位で繰り返します。カラ ムモードでは、ブロックに列名と対応する値の配列を与え、列単位で繰り返し ます。
...["row2_1", "row2_2"])
row3 = CSV::Row.new(["header1", "header2"], ["row3_1", "row3_2"])
table = CSV::Table.new([row1, row2, row3])
table.each { |row| p row }
# => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
# => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
# => #<CSV::Row "header1":"row3......_1", "row2_2"])
row3 = CSV::Row.new(["header1", "header2"], ["row3_1", "row3_2"])
table = CSV::Table.new([row1, row2, row3])
table.by_col!
table.each { |column_name, values| print column_name, values, "\n" }
# => header1["row1_1", "row2_1", "row3_1"]
# => header2["row1_2", "row2_2", "row3_2"]
//}... -
Hash
# keys -> [object] (13.0) -
全キーの配列を返します。
...全キーの配列を返します。
//emlist[例][ruby]{
h1 = { "a" => 100, 2 => ["some"], :c => "c" }
p h1.keys #=> ["a", 2, :c]
//}
@see Hash#values,Hash#to_a... -
Hash
# to _ a -> [Array] (13.0) -
キーと値からなる 2 要素の配列を並べた配列を生成して返します。
...キーと値からなる 2 要素の配列を並べた配列を生成して返します。
//emlist[例][ruby]{
h1 = { "a" => 100, 2 => ["some"], :c => "c" }
p h1.to_a #=> c, "c"
//}
@see Hash#keys,Hash#values...