660件ヒット
[1-100件を表示]
(0.094秒)
クラス
- CSV (33)
-
CSV
:: FieldInfo (11) -
CSV
:: Row (66) -
CSV
:: Table (55) - Enumerator (22)
-
Net
:: HTTPGenericRequest (88) -
Prime
:: PseudoPrimeGenerator (44) -
REXML
:: Elements (22) - StringScanner (22)
モジュール
- Enumerable (22)
-
Net
:: HTTPHeader (275)
キーワード
- [] (66)
- []= (55)
-
basic
_ auth (11) - body (11)
- body= (11)
-
body
_ stream (11) -
body
_ stream= (11) - chunked? (11)
-
content
_ length (11) -
content
_ length= (11) -
content
_ range (11) -
content
_ type= (11) - convert (33)
- delete (33)
- each (11)
-
each
_ capitalized _ name (11) -
each
_ header (11) -
each
_ key (11) -
each
_ name (11) -
each
_ value (11) -
each
_ with _ index (44) - fetch (33)
- field (11)
-
form
_ data= (11) - method (22)
- path (11)
- pointer= (11)
- pos= (11)
-
proxy
_ basic _ auth (11) - range (11)
-
range
_ length (11) -
request
_ body _ permitted? (11) -
response
_ body _ permitted? (11) -
set
_ content _ type (11) -
set
_ form _ data (11) -
with
_ index (44)
検索結果
先頭5件
-
CSV
:: Row # index(header , minimum _ index = 0) -> Integer (18227.0) -
与えられたヘッダの名前に対応するインデックスを返します。
...aram 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... -
CSV
:: FieldInfo # index -> Integer (18114.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-07-09 (... -
Enumerable
# each _ with _ index(*args) {|item , index| . . . } -> self (6240.0) -
要素とそのインデックスをブロックに渡して繰り返します。
...合は、
要素とそのインデックスを繰り返すような
Enumerator を返します。
Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。
@param args イテ......each_with_index do |n, idx|
p [n, idx]
end
# => [5, 0]
# [10, 1]
# [15, 2]
//}
//emlist[引数ありの例][ruby]{
require 'stringio'
StringIO.new("foo|bar|baz").each_with_index("|") do |s, i|
p [s, i]
end
# => ["foo|", 0]
# ["bar|", 1]
# ["baz", 2]
//}
@see Enumerator#with_index... -
Prime
:: PseudoPrimeGenerator # each _ with _ index {|prime , index| . . . } -> self (6237.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...を返します。 ブロックを与えられなかった場合は Enumerator を返します。
//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}
@see Enumerator#with_index... -
Prime
:: PseudoPrimeGenerator # with _ index {|prime , index| . . . } -> self (6237.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...を返します。 ブロックを与えられなかった場合は Enumerator を返します。
//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}
@see Enumerator#with_index... -
Enumerable
# each _ with _ index(*args) -> Enumerator (6140.0) -
要素とそのインデックスをブロックに渡して繰り返します。
...合は、
要素とそのインデックスを繰り返すような
Enumerator を返します。
Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。
@param args イテ......each_with_index do |n, idx|
p [n, idx]
end
# => [5, 0]
# [10, 1]
# [15, 2]
//}
//emlist[引数ありの例][ruby]{
require 'stringio'
StringIO.new("foo|bar|baz").each_with_index("|") do |s, i|
p [s, i]
end
# => ["foo|", 0]
# ["bar|", 1]
# ["baz", 2]
//}
@see Enumerator#with_index... -
Enumerator
# with _ index(offset = 0) -> Enumerator (6139.0) -
生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。
...list[例][ruby]{
str = "xyz"
enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120, 0]
# [121, 1]
# [122, 2]
require "stringio"
StringIO.new("foo|bar|baz").each("|").with_index(1) {|s, i| p [s, i] }
# => ["foo|", 1]......にインデックスを添えてブロックを繰り返します。
インデックスは 0 から始まります。
Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。... -
Enumerator
# with _ index(offset = 0) {|(*args) , idx| . . . } -> object (6139.0) -
生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。
...list[例][ruby]{
str = "xyz"
enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120, 0]
# [121, 1]
# [122, 2]
require "stringio"
StringIO.new("foo|bar|baz").each("|").with_index(1) {|s, i| p [s, i] }
# => ["foo|", 1]......にインデックスを添えてブロックを繰り返します。
インデックスは 0 から始まります。
Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。... -
Prime
:: PseudoPrimeGenerator # each _ with _ index -> Enumerator (6137.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...を返します。 ブロックを与えられなかった場合は Enumerator を返します。
//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}
@see Enumerator#with_index... -
Prime
:: PseudoPrimeGenerator # with _ index -> Enumerator (6137.0) -
与えられたブロックに対して、素数を0起点の連番を渡して評価します。
...を返します。 ブロックを与えられなかった場合は Enumerator を返します。
//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}
@see Enumerator#with_index...