110件ヒット
[1-100件を表示]
(0.114秒)
ライブラリ
- csv (55)
-
net
/ http (11) -
rexml
/ document (33) -
rubygems
/ indexer (11)
クラス
- CSV (22)
-
CSV
:: FieldInfo (22) -
CSV
:: Row (11) -
Gem
:: Indexer (11) -
REXML
:: Parent (33)
モジュール
-
Net
:: HTTPHeader (11)
キーワード
- [] (11)
-
build
_ indices (9) -
build
_ indicies (2) - convert (22)
-
delete
_ at (11) - field (11)
-
get
_ fields (11) - index= (11)
検索結果
先頭5件
-
CSV
:: FieldInfo # index -> Integer (21108.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 ((2458309j,0s,0n),+0s,2299161j)> "date2":#<Date... -
REXML
:: Parent # index(child) -> Integer | nil (18202.0) -
child の子ノード列上での位置を返します。
...child の子ノード列上での位置を返します。
child が子ノードでない場合には nil を返します。... -
CSV
:: FieldInfo # index=(val) (9102.0) -
インデックスの値をセットします。
インデックスの値をセットします。
@param val インデックスの値を指定します。 -
Gem
:: Indexer # build _ indices (9101.0) -
インデックスを構築します。
インデックスを構築します。 -
Gem
:: Indexer # build _ indicies (9101.0) -
インデックスを構築します。
インデックスを構築します。 -
Net
:: HTTPHeader # get _ fields(key) -> [String] (6107.0) -
key ヘッダフィールドの値 (文字列) を配列で返します。
...ール名を文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.get_fields('accept-ranges') # => ["none"]
//}
@see Net::HTTPHeader#[] , Net::HTTPHeader#[]=,
Net::HTTPHeader#add_field... -
CSV
:: Row # field(header _ or _ index , minimum _ index = 0) -> object | nil (3317.0) -
ヘッダの名前かインデックスで値を取得します。フィールドが見つからなかった場合は nil を返します。
...します。フィールドが見つからなかった場合は nil を返します。
@param header_or_index ヘッダの名前かインデックスを指定します。
@param minimum_index このインデックスより後で、ヘッダの名前を探します。
重複し......ているヘッダがある場合に便利です。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row.field("header1") # => "row1_1"
row.field("header2") # => "row1_2"
row["header1"] # => "row1_1"
row["header2"] # => "row1_2"
//}... -
REXML
:: Parent # delete _ at(index) -> REXML :: Child | nil (224.0) -
子ノード列上の index で指定された場所の要素を取り除きます。
...子ノード列上の index で指定された場所の要素を取り除きます。
取り除いだノードを返します。indexが範囲外である場合は何もせず
nil を返します。... -
REXML
:: Parent # [](index) -> REXML :: Child | nil (218.0) -
子ノード列上の index で指定された場所のノードを返します。
...子ノード列上の index で指定された場所のノードを返します。
範囲外を指定した場合は nil を返します。... -
CSV
# convert {|field , field _ info| . . . } (213.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
...ります。ブロックパラメータを二つ受け取るブロックを与
えた場合は、そのブロックは、フィールドと CSV::FieldInfo のインス
タンスを受け取ります。ブロックは変換後の値かフィールドそのものを返さな
ければなりません......018-07-10", headers: true)
csv.convert do |field,field_info|
p field
p field_info
Date.parse(field)
end
p csv.first
# => "2018-07-09"
# => <struct CSV::FieldInfo index=0, line=2, header="date1">
# => "2018-07-10"
# => #<struct CSV::FieldInfo index=1, line=2, header="date2">
# => #<CSV::Row "d... -
CSV
# convert {|field| . . . } (113.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
...ります。ブロックパラメータを二つ受け取るブロックを与
えた場合は、そのブロックは、フィールドと CSV::FieldInfo のインス
タンスを受け取ります。ブロックは変換後の値かフィールドそのものを返さな
ければなりません......018-07-10", headers: true)
csv.convert do |field,field_info|
p field
p field_info
Date.parse(field)
end
p csv.first
# => "2018-07-09"
# => <struct CSV::FieldInfo index=0, line=2, header="date1">
# => "2018-07-10"
# => #<struct CSV::FieldInfo index=1, line=2, header="date2">
# => #<CSV::Row "d...