41件ヒット
[1-41件を表示]
(0.018秒)
検索結果
先頭4件
-
CSV
. generate(str = "" , options = Hash . new) {|csv| . . . } -> String (18119.0) -
このメソッドは与えられた文字列をラップして CSV のオブジェクトとしてブロックに渡します。 ブロック内で CSV オブジェクトに行を追加することができます。 ブロックを評価した結果は文字列を返します。
...][ruby]{
require "csv"
text =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
csv = CSV.generate(text, headers: true) do |csv|
csv.add_row(["5", "saburo", "kondo", "34"])
end
print csv
# => id,first name,last name,age
# 1,taro,tanaka,20
# 2... -
CSV
. new(data , options = Hash . new) -> CSV (54.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...をラップします。
ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用してください。
他の位置から処理したい場合はあらかじめそのように設定した StringIO を渡してくだ......す。
: :field_size_limit
This is a maximum size CSV will read ahead looking for the closing quote
for a field. (In truth, it reads to the first line ending beyond this
size.) If a quote cannot be found within the limit CSV will raise a
MalformedCSVError, assuming the data is faulty.......よって
追加したヘッダはフィールドではないので
CSV::Row#unconverted_fields は空の配列を返します。
: :headers
:first_row というシンボルか真を指定すると、CSV ファイルの一行目をヘッダとして扱います。
配列を指定するとそ... -
NEWS for Ruby 3
. 0 . 0 (18.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...will cause compaction to occur during major collections. At the moment, compaction adds significant overhead to major collections, so please test first! 17176
* Hash
* Hash#transform_keys and Hash#transform_keys! now accept a hash that maps keys to new keys. 16274
* Hash#except has bee......16555
* Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print can take the request headers as a Hash in the second argument when the first argument is a URI. 16686
* Net::SMTP
* Add SNI support.
* Net::SMTP.start arguments are keyword arguments.
* TLS should not check t......rd`, `#to_i`, `#to_int`, `#zero?`
* `Struct`: reader methods for 10th or later members
* Constant references are inlined.
* Always generate appropriate code for `==`, `nil?`, and `!` calls depending on a receiver class.
* Reduce the number of PC accesses on branches and method re... -
ruby 1
. 8 . 2 feature (12.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...ow [lib] [obsolete]
: CSV::Cell [lib] [obsolete]
CSV::Row と CSV::Cell が deprecated になりました。
: CSV.open, CSV.parse, and CSV,generate
必要ならばユーザが binmode をセットしなければならなくなりました。
: CSV.read [lib] [new]
: CSV.readlines [li......[ruby] [bug]
適切にマッチしないバグを修正しました。
((<ruby-dev:22815>)) ((<ruby-dev:22819>))
=== 2004-02-06
: PrettyPrint#first? [lib] [obsolete]
=== 2004-02-05
: PrettyPrint#seplist [lib] [new]
=== 2004-01-29
: OpenSSL::X509::Name#add_entry [lib] [new]
=== 2004-01-26
:...