1574件ヒット
[1-100件を表示]
(0.095秒)
別のキーワード
クラス
- Array (282)
- CSV (24)
-
CSV
:: FieldInfo (12) -
CSV
:: Row (60) -
CSV
:: Table (60) - Enumerator (24)
-
Enumerator
:: Lazy (12) - Hash (152)
- MatchData (40)
- Matrix (120)
-
Net
:: HTTP (144) -
Net
:: HTTPGenericRequest (96) -
Net
:: HTTPResponse (96) -
Prime
:: PseudoPrimeGenerator (48) -
REXML
:: Elements (24) - Regexp (12)
-
RubyVM
:: InstructionSequence (12) - String (54)
- StringScanner (24)
- Vector (7)
モジュール
- Enumerable (79)
-
Net
:: HTTPHeader (192)
キーワード
- [] (72)
- []= (43)
-
basic
_ auth (12) - begin (12)
- body (24)
- body= (12)
-
body
_ stream (12) -
body
_ stream= (12) - bsearch (20)
-
bsearch
_ index (20) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byterindex (3)
- code (12)
-
content
_ length (12) -
content
_ range (12) - convert (24)
- delete (36)
- each (48)
-
each
_ capitalized _ name (12) -
each
_ index (24) -
each
_ with _ index (72) - end (12)
- entity (12)
- fetch (48)
-
fetch
_ values (2) - field (12)
- fill (72)
- filter! (14)
-
find
_ index (108) - get (24)
- get2 (24)
-
get
_ fields (12) - getbyte (12)
- head (12)
- head2 (24)
-
http
_ version (12) -
keep
_ if (24) - key (7)
-
main
_ type (12) - method (24)
- msg (12)
-
named
_ captures (12) - path (12)
- pointer= (12)
- pos= (12)
-
proxy
_ basic _ auth (12) - range (12)
-
range
_ length (12) -
read
_ body (12) -
request
_ body _ permitted? (12) -
request
_ get (24) -
request
_ head (24) -
response
_ body _ permitted? (12) - rindex (48)
- select! (24)
-
send
_ request (12) - setbyte (12)
-
sub
_ type (12) -
to
_ a (12) -
to
_ h (19) -
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) - value (12)
-
values
_ at (12) -
with
_ index (60)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # to _ a -> Array (29043.0) -
self の情報を 14 要素の配列にして返します。
...ンスを以下の情報で表します。
: magic
データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイナーバージ......ータフォーマットを示す数値。常に 1。
: misc
以下の要素から構成される Hash オブジェクト。
:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。
:local_size: ローカル変数の総数 + 1。
:stack_max: ス......in>"。文字列から作成していた場合は
"<compiled>"。
: #path
命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。
: #absolute_path
命令シーケンスの絶対パス。文字列から作成していた場合は nil。
: #first_li... -
Array
# index {|item| . . . } -> Integer | nil (27355.0) -
条件に一致する最初の要素の位置を返します。
...置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロックが与えられた場合には、各要素を引数とし......返します。
一つも真にならなかった場合は nil を返します。
//emlist[例][ruby]{
p [0, 1, 0, 1, 0].index {|v| v > 0} #=> 1
//}
引数、ブロックのどちらも与えられなかった場合は、
Enumerator のインスタンスを返します。
@see Array#rindex... -
Array
# index(val) -> Integer | nil (27355.0) -
条件に一致する最初の要素の位置を返します。
...置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロックが与えられた場合には、各要素を引数とし......返します。
一つも真にならなかった場合は nil を返します。
//emlist[例][ruby]{
p [0, 1, 0, 1, 0].index {|v| v > 0} #=> 1
//}
引数、ブロックのどちらも与えられなかった場合は、
Enumerator のインスタンスを返します。
@see Array#rindex... -
String
# index(pattern , pos = 0) -> Integer | nil (27344.0) -
文字列のインデックス pos から右に向かって pattern を検索し、 最初に見つかった部分文字列の左端のインデックスを返します。 見つからなければ nil を返します。
...かって pattern を検索し、
最初に見つかった部分文字列の左端のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定します。
pos が負の場合、文字列の末尾......ンデックス
//emlist[例][ruby]{
p "astrochemistry".index("str") # => 1
p "regexpindex".index(/e.*x/, 2) # => 3
p "character".index(?c) # => 0
p "foobarfoobar".index("bar", 6) # => 9
p "foobarfoobar".index("bar", -6) # => 9
//}
@see String#rindex......mlist[例][ruby]{
p "astrochemistry".index("str") # => 1
p "regexpindex".index(/e.*x/, 2) # => 3
p "character".index(?c) # => 0
p "foobarfoobar".index("bar", 6) # => 9
p "foobarfoobar".index("bar", -6) # => 9
//}
@see String#rindex
@see String#byteindex... -
Array
# index -> Enumerator (27255.0) -
条件に一致する最初の要素の位置を返します。
...置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロックが与えられた場合には、各要素を引数とし......返します。
一つも真にならなかった場合は nil を返します。
//emlist[例][ruby]{
p [0, 1, 0, 1, 0].index {|v| v > 0} #=> 1
//}
引数、ブロックのどちらも与えられなかった場合は、
Enumerator のインスタンスを返します。
@see Array#rindex... -
CSV
:: Row # index(header , minimum _ index = 0) -> Integer (24633.0) -
与えられたヘッダの名前に対応するインデックスを返します。
...@param minimum_index このインデックスより後で、ヘッダの名前を探します。
重複しているヘッダがある場合に便利です。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2", "header1"], [1, 2, 3])
row.index("header1......") # => 0
row.index("header1", 1) # => 2
//}
@see CSV::Row#field... -
Matrix
# index(selector = :all) {|e| . . . } -> [Integer , Integer] | nil (24431.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず、さらにブロ... -
Matrix
# index(value , selector = :all) -> [Integer , Integer] | nil (24431.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず、さらにブロ... -
CSV
:: FieldInfo # index -> Integer (24320.0) -
行内で何番目のフィールドかわかるゼロベースのインデックスを返します。
...ロベースのインデックスを返します。
//emlist[例][ruby]{
require 'csv'
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.index
Date.parse(field)
end
p csv.first
# => 0
# => 1
# => #<CSV::Row "date1":#<Date: 2018-0...