144件ヒット
[1-100件を表示]
(0.076秒)
ライブラリ
- csv (72)
- date (12)
- rss (48)
-
webrick
/ httpresponse (12)
クラス
- CSV (36)
-
CSV
:: FieldInfo (36) - Date (12)
-
RSS
:: Maker :: ChannelBase (24) -
RSS
:: Rss :: Channel (24) -
WEBrick
:: HTTPResponse (12)
キーワード
- [] (12)
- convert (24)
- header (12)
- index (12)
- lastBuildDate (24)
- lastBuildDate= (24)
- line (12)
-
unconverted
_ fields? (12)
検索結果
先頭5件
-
Date
# ld -> Integer (35102.0) -
リリウス日を返します。
リリウス日を返します。 -
RSS
:: Maker :: ChannelBase # lastBuildDate (12201.0) -
@todo
@todo -
RSS
:: Maker :: ChannelBase # lastBuildDate=() (12201.0) -
@todo
@todo -
RSS
:: Rss :: Channel # lastBuildDate (12201.0) -
@todo
@todo -
RSS
:: Rss :: Channel # lastBuildDate= (12201.0) -
@todo
@todo -
CSV
# unconverted _ fields? -> bool (6155.0) -
パースした結果が unconverted_fields というメソッドを持つ場合に真を返します。 そうでない場合は、偽を返します。
...が unconverted_fields というメソッドを持つ場合に真を返します。
そうでない場合は、偽を返します。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10")
csv.unconverted_fields? # => nil
csv = CSV.new("date1,date2\n2018-07-09,2018-......07-10", unconverted_fields: false)
csv.unconverted_fields? # => false
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true, unconverted_fields: true)
csv.unconverted_fields? # => true
csv.convert(:date)
row = csv.readline
row.fields # => [#<Date: 2018-07-09 ((2458309j,0s,0n......),+0s,2299161j)>, #<Date: 2018-07-10 ((2458310j,0s,0n),+0s,2299161j)>]
row.unconverted_fields # => ["2018-07-09", "2018-07-10"]
//}
@see CSV.new... -
CSV
:: FieldInfo # header -> String | nil (3055.0) -
利用可能な場合はヘッダを表す文字列を返します。
...sv'
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.header
Date.parse(field)
end
p csv.first
# => "date1"
# => "date2"
# => #<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)> "date2":#<Date: 2018-07-10 ((2458... -
CSV
:: FieldInfo # line -> Integer (3055.0) -
行番号を返します。
...new("date1,date2,date3\n2018-07-09,2018-07-10\n2018-08-09,2018-08-10", headers: true)
csv.convert do |field,field_info|
p field_info.line
Date.parse(field)
end
p csv.to_a
# => 2
# => 2
# => 3
# => 3
# => [#<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)> "date2":#<Date: 201......8-07-10 ((2458310j,0s,0n),+0s,2299161j)> "date3":nil>, ...]
//}... -
CSV
:: FieldInfo # index -> Integer (3043.0) -
行内で何番目のフィールドかわかるゼロベースのインデックスを返します。
...ire '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: 2018-07-10 ((2458310j,0s...