1962件ヒット
[1901-1962件を表示]
(0.128秒)
ライブラリ
- ビルトイン (86)
-
cgi
/ core (12) -
cgi
/ session (48) -
cgi
/ session / pstore (12) - csv (96)
- date (712)
- digest (12)
-
json
/ add / date (12) -
json
/ add / date _ time (12) - logger (48)
-
net
/ imap (60) - open-uri (12)
- openssl (72)
- rss (456)
-
rubygems
/ commands / update _ command (24) -
rubygems
/ config _ file (24) -
rubygems
/ source _ index (24) -
rubygems
/ source _ info _ cache (12) -
rubygems
/ specification (36) -
rubygems
/ user _ interaction (36) - time (36)
-
webrick
/ httpresponse (72)
クラス
- Array (12)
- CGI (12)
-
CGI
:: Session (12) -
CGI
:: Session :: FileStore (12) -
CGI
:: Session :: MemoryStore (12) -
CGI
:: Session :: NullStore (12) -
CGI
:: Session :: PStore (12) - CSV (48)
-
CSV
:: FieldInfo (36) - Date (518)
- DateTime (182)
-
Digest
:: Base (12) - Exception (24)
-
Gem
:: Commands :: UpdateCommand (24) -
Gem
:: ConfigFile (24) -
Gem
:: SourceIndex (24) -
Gem
:: SourceInfoCache (12) -
Gem
:: Specification (36) -
Gem
:: StreamUI :: SilentProgressReporter (12) -
Gem
:: StreamUI :: SimpleProgressReporter (12) -
Gem
:: StreamUI :: VerboseProgressReporter (12) - Logger (24)
-
Logger
:: Formatter (24) - Module (12)
-
Net
:: IMAP (36) -
Net
:: IMAP :: ContentDisposition (12) -
Net
:: IMAP :: Envelope (12) -
OpenSSL
:: Cipher (12) -
OpenSSL
:: Digest (12) -
OpenSSL
:: X509 :: CRL (48) -
RDoc
:: Options (12) -
RSS
:: ImageFaviconModel :: ImageFavicon (24) -
RSS
:: ImageItemModel :: ImageItem (24) -
RSS
:: Maker :: ChannelBase (24) -
RSS
:: Maker :: ItemsBase (12) -
RSS
:: Maker :: ItemsBase :: ItemBase (48) -
RSS
:: Parser (24) -
RSS
:: RDF :: Channel :: ImageFavicon (24) -
RSS
:: RDF :: Image (24) -
RSS
:: RDF :: Item (24) -
RSS
:: RDF :: Textinput (24) -
RSS
:: Rss :: Channel (24) -
RSS
:: Rss :: Channel :: Item (48) -
RSS
:: TaxonomyTopicModel :: TaxonomyTopic (24) - Random (24)
- Range (14)
- Time (84)
-
WEBrick
:: HTTPResponse (72)
モジュール
- DublinCoreModel (36)
-
Gem
:: InstallUpdateOptions (24) -
Gem
:: LocalRemoteOptions (12) -
OpenURI
:: Meta (12) -
RSS
:: SyndicationModel (72)
キーワード
- - (12)
- <=> (12)
- == (12)
- [] (12)
-
add
_ update _ sources _ option (12) - ajd (12)
- amjd (12)
- append (12)
- asctime (12)
- autoload? (12)
-
backtrace
_ locations (12) - body= (12)
- chunked= (12)
-
content
_ length (12) -
content
_ length= (12) - convert (24)
- ctime (12)
- cwday (12)
- cweek (12)
- cwyear (12)
- date= (120)
-
datetime
_ format (24) -
datetime
_ format= (24) - day (12)
-
dc
_ date (12) -
dc
_ date= (12) -
dc
_ dates (12) -
deconstruct
_ keys (4) -
do
_ rubygems _ update (12) -
do
_ sort= (12) -
do
_ validate (12) -
do
_ validate= (12) - downto (24)
- entries (7)
-
force
_ update (12) - friday? (12)
- gregorian (12)
- gregorian? (12)
- header (24)
- hour (12)
- httpdate (24)
- index (12)
-
install
_ update _ defaults _ str (12) - iso8601 (24)
- italy (12)
- jd (12)
- jisx0301 (24)
- julian (12)
- julian? (12)
- lastBuildDate (24)
- lastBuildDate= (24)
-
last
_ update (12) -
last
_ update= (12) - ld (12)
- line (12)
- mday (12)
- min (12)
- minute (12)
- mjd (12)
- mon (12)
- month (12)
-
new
_ offset (12) -
new
_ start (12) -
next
_ update (12) -
next
_ update= (12) - offset (12)
- outdated (12)
- param (12)
- pubDate (24)
- pubDate= (24)
- rand (24)
- rfc2822 (24)
- rfc3339 (24)
- rfc822 (24)
- sec (12)
-
sec
_ fraction (12) - second (12)
-
second
_ fraction (12) - sort (12)
- start (12)
- step (24)
- strftime (24)
-
sy
_ updateBase (12) -
sy
_ updateBase= (12) -
sy
_ updateFrequency (12) -
sy
_ updateFrequency= (12) -
sy
_ updatePeriod (12) -
sy
_ updatePeriod= (12) -
to
_ a (7) -
to
_ csv (12) -
to
_ date (12) -
to
_ datetime (24) -
to
_ json (24) -
to
_ s (24) -
to
_ time (24) -
uid
_ sort (12) -
unconverted
_ fields? (12) - update (120)
-
update
_ sources (12) -
update
_ sources= (12) - updated (36)
- validate (12)
- wday (12)
-
which
_ to _ update (12) -
write
_ headers? (12) - xmlschema (24)
- yday (12)
- year (12)
- zone (12)
検索結果
先頭5件
-
CSV
# convert {|field , field _ info| . . . } (297.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
...ieldInfo のインス
タンスを受け取ります。ブロックは変換後の値かフィールドそのものを返さな
ければなりません。
@param name 変換器の名前を指定します。
//emlist[例 name で Converter を指定][ruby]{
require "csv"
csv = CSV.new("date1,date......:date)
csv.read # => 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)>, #<Date: 2018-07-10 ((2458310j,0s,0n),+0s,2299161j)>
//}
//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
p fie......ld_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 "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)> "date2":#<Date: 2018... -
CSV
# convert {|field| . . . } (197.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
...ieldInfo のインス
タンスを受け取ります。ブロックは変換後の値かフィールドそのものを返さな
ければなりません。
@param name 変換器の名前を指定します。
//emlist[例 name で Converter を指定][ruby]{
require "csv"
csv = CSV.new("date1,date......:date)
csv.read # => 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)>, #<Date: 2018-07-10 ((2458310j,0s,0n),+0s,2299161j)>
//}
//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
p fie......ld_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 "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)> "date2":#<Date: 2018... -
Module
# autoload?(const _ name) -> String | nil (137.0) -
autoload 定数がまだ定義されてない(ロードされていない) ときにそのパス名を返します。 また、ロード済みなら nil を返します。
...を返します。
また、ロード済みなら nil を返します。
@param const_name String または Symbol で指定します。
@see Kernel.#autoload?
//emlist[例][ruby]{
autoload :Date, 'date'
autoload?(:Date) # => "date"
Date
autoload?(:Date) # => nil
autoload?(:Foo) # => nil
//}... -
Random
# rand(max) -> Integer | Float (131.0) -
一様な擬似乱数を発生させます。
...e.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終端を含む場合は1、含まない場合は0です)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Time の場合な......どにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定されたものとして扱います。
@param max 乱数値の上限を正の整数または実数で指定します。
max 自体は乱数値の範囲に......range.end - range.begin は数値である必要があり、
range.begin + 数値 が適切な値を返す必要があります。
@raise Errno::EDOM rand(1..Float::INFINITY) などのように範囲に問題があるときに発生します。
@raise ArgumentError 引数の数... -
Random
# rand(range) -> Integer | Float (131.0) -
一様な擬似乱数を発生させます。
...e.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終端を含む場合は1、含まない場合は0です)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Time の場合な......どにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定されたものとして扱います。
@param max 乱数値の上限を正の整数または実数で指定します。
max 自体は乱数値の範囲に......range.end - range.begin は数値である必要があり、
range.begin + 数値 が適切な値を返す必要があります。
@raise Errno::EDOM rand(1..Float::INFINITY) などのように範囲に問題があるときに発生します。
@raise ArgumentError 引数の数... -
Array
# to _ csv(**options) -> String (113.0) -
CSV.generate_line(self, options) と同様です。
...erate_line(self, options) と同様です。
Array オブジェクトを 1 行の CSV 文字列に変換するためのショートカットです。
@param options CSV.generate_line と同様のオプションを指定します。
//emlist[][ruby]{
require 'csv'
p [1, 'Matz', :Ruby, Date.new(19......65, 4, 14)].to_csv # => "1,Matz,Ruby,1965-04-14\n"
p [1, 'Matz', :Ruby, Date.new(1965, 4, 14)].to_csv(col_sep: ' ', row_sep: "\r\n") # => "1 Matz Ruby 1965-04-14\r\n"
//}
@see CSV.generate_line......by, Date.new(1965, 4, 14)].to_csv(col_sep: ' ', row_sep: "\r\n") # => "1 Matz Ruby 1965-04-14\r\n"
//}
Ruby 3.0 (CSV 3.1.9) から、次のオプションが使えるようになりました。
//emlist[][ruby]{
require 'csv'
puts [1, nil].to_csv # => 1,
puts [1, nil].......to_csv(write_nil_value: "N/A") # => 1,N/A
puts [2, ""].to_csv # => 2,""
puts [2, ""].to_csv(write_empty_value: "BLANK") # => 2,BLANK
//}
@see CSV.generate_line...