484件ヒット
[101-200件を表示]
(0.081秒)
ライブラリ
- ビルトイン (156)
-
cgi
/ core (24) - csv (28)
- dbm (12)
- matrix (12)
- openssl (36)
- optparse (144)
- rake (12)
-
rexml
/ document (12) -
rinda
/ tuplespace (12) -
win32
/ registry (12) - win32ole (12)
クラス
- Array (58)
-
CGI
:: Cookie (12) -
CSV
:: Row (12) -
CSV
:: Table (12) - DBM (12)
- Enumerator (24)
- Hash (54)
- MatchData (12)
- Matrix (12)
-
OpenSSL
:: X509 :: ExtensionFactory (36) - OptionParser (144)
-
REXML
:: Element (12) -
Rake
:: TaskArguments (12) -
Rinda
:: TupleEntry (12) - String (12)
-
WIN32OLE
_ VARIANT (12) -
Win32
:: Registry (12)
モジュール
キーワード
- [] (12)
- []= (12)
-
add
_ attributes (12) - coerce (12)
- compact (9)
- compact! (9)
-
create
_ ext _ from _ array (12) -
create
_ extension (24) -
fetch
_ values (2) - names (12)
-
next
_ values (12) - on (144)
- pack (21)
-
peek
_ values (12) - rassoc (12)
- select (12)
- shift (12)
-
to
_ a (12) -
to
_ ary (12) -
to
_ csv (4) -
to
_ h (19) - unpack (12)
-
values
_ at (60)
検索結果
先頭5件
-
Enumerator
# next _ values -> Array (6202.0) -
「次」のオブジェクトを配列で返します。
...values の違いを][ruby]{
o = Object.new
def o.each
yield
yield 1
yield 1, 2
yield nil
yield [1, 2]
end
e = o.to_enum
p e.next_values
p e.next_values
p e.next_values
p e.next_values
p e.next_values
e = o.to_enum
p e.next
p e.next
p e.next
p e.next
p e.next
## yield args next_value......[1] 1
# yield 1, 2 [1, 2] [1, 2]
# yield nil [nil] nil
# yield [1, 2] [[1, 2]] [1, 2]
//}
@raise StopIteration 列挙状態が既に最後へ到達しているとき
@see Enumerator#next, Enumerator#peek, Enumerator#peek_values... -
Enumerator
# peek _ values -> Array (6202.0) -
Enumerator#next_values のように「次」のオブジェクトを 配列で返しますが、列挙状態を変化させません。
...Enumerator#next_values のように「次」のオブジェクトを
配列で返しますが、列挙状態を変化させません。
Enumerator#next, Enumerator#next_values のように
現在までの列挙状態に応じて「次」のオブジェクトを返しますが、
next と異なり......r#next_values と同様
yield
と
yield nil
を区別するために使えます。
//emlist[例][ruby]{
o = Object.new
def o.each
yield
yield 1
yield 1, 2
end
e = o.to_enum
p e.peek_values #=> []
e.next
p e.peek_values #=> [1]
p e.peek_values #=> [1]
e.next
p e.peek_values #=......> [1, 2]
e.next
p e.peek_values # raises StopIteration
//}
@raise StopIteration 列挙状態が既に最後へ到達しているとき
@see Enumerator#next, Enumerator#next_values, Enumerator#peek_values... -
OpenSSL
:: X509 :: ExtensionFactory # create _ ext _ from _ array(ary) -> OpenSSL :: X509 :: Extension (6134.0) -
[oid, value, critical] もしくは [oid, value] という配列から OpenSSL::X509::Extension オブジェクトを生成します。
...[oid, value, critical] もしくは [oid, value] という配列から
OpenSSL::X509::Extension オブジェクトを生成します。
@param ary 生成する拡張領域のデータの配列
@see OpenSSL::X509::ExtensionFactory#create_ext... -
MatchData
# values _ at(*index) -> [String] (6113.0) -
正規表現中の n 番目の括弧にマッチした部分文字列の配列を返します。
...m.to_a.values_at(...)
p m.values_at(0, 1, 2, 3, 4) # => ["foobarbaz", "foo", "bar", "baz", nil]
p m.values_at(-1, -2, -3, -4, -5) # => ["baz", "bar", "foo", nil, nil]
m = /(?<a>\d+) *(?<op>[+\-*\/]) *(?<b>\d+)/.match("1 + 2")
m.to_a # => ["1 + 2", "1", "+", "2"]
m.values_at(:......a, :b, :op) # => ["1", "2", "+"]
//}
@see Array#values_at, Array#[]... -
Hash
# values _ at(*keys) -> [object] (6107.0) -
引数で指定されたキーに対応する値の配列を返します。
...引数が指定されなかった場合は、空の配列を返します。
//emlist[例][ruby]{
h = {1=>"a", 2=>"b", 3=>"c"}
p h.values_at(1,3,4) #=> ["a", "c", nil]
# [h[1], h[3] ,h[4]] と同じ
//}
@see Hash#[] , Hash.new, Hash#default, Hash#default_proc, Array#values_at... -
CSV
:: Row # values _ at(*headers _ and _ or _ indices) -> Array (3203.0) -
与えられた引数に対応する値の配列を返します。
...るこ
とができます。
@return 引数を与えなかった場合は全ての要素を返します。
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
row = table.first
row.values_at("a", 1, 2..3) # => ["1", "2", "3", nil]... -
CGI
:: QueryExtension :: Value # to _ a -> Array (3103.0) -
@todo
@todo -
CGI
:: QueryExtension :: Value # to _ ary -> Array (3103.0) -
@todo
@todo -
Hash
# rassoc(value) -> Array | nil (231.0) -
ハッシュ内を検索して,引数 value と 一致する値を探します。
...,引数 value と 一致する値を探します。
比較は == メソッドを使用して行われます。一致する値があれば,
該当するキーとその値とを要素とするサイズ 2 の配列を返します。
ない場合には nil を返します。
@param value 探索す......る値。
//emlist[例][ruby]{
a = {1=> "one", 2 => "two", 3 => "three", "ii" => "two"}
a.rassoc("two") #=> [2, "two"]
a.rassoc("four") #=> nil
//}
@see Hash#assoc, Array#rassoc...