24件ヒット
[1-24件を表示]
(0.076秒)
別のキーワード
クラス
- CSV (12)
-
URI
:: MailTo (12)
検索結果
-
URI
:: MailTo # headers -> [[String]] (18239.0) -
自身のヘッダーを文字列の配列の配列として設定します。
...自身のヘッダーを文字列の配列の配列として設定します。
例:
require 'uri'
m = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
p m.headers #=> [["subject", "subscribe"], ["cc", "myaddr"]]... -
CSV
# col _ sep -> String (132.0) -
カラム区切り文字列として使用する文字列を返します。
...列として使用する文字列を返します。
//emlist[例][ruby]{
require "csv"
users =<<-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.new(users, headers: true, col_sep: "|")
csv.col_sep # => "|"
csv.first.to_a # => [["id",......"1"], ["first name", "taro"], ["last name", "tanaka"], ["age", "20"]]
csv = CSV.new(users, headers: true)
csv.col_sep # => ","
csv.first.to_a # => [["id|first name|last name|age", "1|taro|tanaka|20"]]
//}
@see CSV.new...