るりまサーチ

最速Rubyリファレンスマニュアル検索!
29件ヒット [1-29件を表示] (0.035秒)
トップページ > クエリ:print[x] > クエリ:generate[x]

別のキーワード

  1. stringio print
  2. _builtin print
  3. http get_print
  4. cgi print
  5. net/http get_print

ライブラリ

クラス

キーワード

検索結果

CSV.generate(str = "", options = Hash.new) {|csv| ... } -> String (18113.0)

このメソッドは与えられた文字列をラップして CSV のオブジェクトとしてブロックに渡します。 ブロック内で CSV オブジェクトに行を追加することができます。 ブロックを評価した結果は文字列を返します。

...rst 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,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,a...

CSV#force_quotes? -> bool (24.0)

出力される全てのフィールドがクオートされる場合は、真を返します。

...ult = CSV.generate(force_quotes: false) do |csv|
rows.each { |row| csv << row }
csv.force_quotes? # => false
end
print
result

# => header1,header2
# "row1_1,",row1_2
//}

//emlist[例][ruby]{
require "csv"

rows = [["header1", "header2"], ["row1_1,", "row1_2"]]
result = CSV.generate(force_qu...
...otes: true) do |csv|
rows.each { |row| csv << row }
csv.force_quotes? # => true
end
print
result

# => true
# => "header1","header2"
# "row1_1,","row1_2"
//}

@see CSV.new...

NEWS for Ruby 3.0.0 (12.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...and Net::HTTP#verify_hostname have been added to skip hostname verification. 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.
*...
...erb
* find
* net-ftp
* net-http
* net-imap
* net-protocol
* open-uri
* optparse
* pp
* prettyprint
* resolv-replace
* resolv
* rinda
* set
* securerandom
* shellwords
* tempfile
* tmpdir
* ti...
...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...