12件ヒット
[1-12件を表示]
(0.176秒)
ライブラリ
- csv (12)
キーワード
-
col
_ sep (1) -
external
_ encoding (1) - fcntl (1)
-
field
_ size _ limit (1) - gets (1)
-
internal
_ encoding (1) - ioctl (1)
- path (1)
-
quote
_ char (1) - readline (1)
- shift (1)
- truncate (1)
検索結果
先頭5件
-
CSV
# external _ encoding -> Encoding | nil (36907.0) -
IO#external_encoding に委譲します。
IO#external_encoding に委譲します。 -
CSV
# internal _ encoding -> Encoding | nil (36907.0) -
IO#internal_encoding に委譲します。
IO#internal_encoding に委譲します。
@see IO#internal_encoding -
CSV
# truncate(path , length) -> 0 (18907.0) -
File#truncate に委譲します。
File#truncate に委譲します。
@see File#truncate -
CSV
# gets -> Array | CSV :: Row (18607.0) -
String や IO をラップしたデータソースから一行だけ読み込んで フィールドの配列か CSV::Row のインスタンスを返します。
...ールドの配列か CSV::Row のインスタンスを返します。
データソースは読み込み用にオープンされている必要があります。
@return ヘッダを使用しない場合は配列を返します。
ヘッダを使用する場合は CSV::Row を返します......。
//emlist[例][ruby]{
require "csv"
csv = CSV.new(DATA.read)
csv.readline # => ["header1", "header2"]
csv.readline # => ["row1_1", "row1_2"]
__END__
header1,header2
row1_1,row1_2
//}... -
CSV
# path -> String (18607.0) -
IO#path に委譲します。
IO#path に委譲します。
@see IO#path -
CSV
# quote _ char -> String (18607.0) -
フィールドをクオートするのに使用する文字列を返します。
...フィールドをクオートするのに使用する文字列を返します。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2", quote_char: "'")
csv.quote_char # => "'"
//}
@see CSV.new... -
CSV
# readline -> Array | CSV :: Row (18307.0) -
String や IO をラップしたデータソースから一行だけ読み込んで フィールドの配列か CSV::Row のインスタンスを返します。
...ールドの配列か CSV::Row のインスタンスを返します。
データソースは読み込み用にオープンされている必要があります。
@return ヘッダを使用しない場合は配列を返します。
ヘッダを使用する場合は CSV::Row を返します......。
//emlist[例][ruby]{
require "csv"
csv = CSV.new(DATA.read)
csv.readline # => ["header1", "header2"]
csv.readline # => ["row1_1", "row1_2"]
__END__
header1,header2
row1_1,row1_2
//}... -
CSV
# shift -> Array | CSV :: Row (9307.0) -
String や IO をラップしたデータソースから一行だけ読み込んで フィールドの配列か CSV::Row のインスタンスを返します。
...ールドの配列か CSV::Row のインスタンスを返します。
データソースは読み込み用にオープンされている必要があります。
@return ヘッダを使用しない場合は配列を返します。
ヘッダを使用する場合は CSV::Row を返します......。
//emlist[例][ruby]{
require "csv"
csv = CSV.new(DATA.read)
csv.readline # => ["header1", "header2"]
csv.readline # => ["row1_1", "row1_2"]
__END__
header1,header2
row1_1,row1_2
//}... -
CSV
# fcntl(cmd , arg = 0) -> Integer (607.0) -
IO#fcntl に委譲します。
IO#fcntl に委譲します。 -
CSV
# ioctl(cmd , arg = 0) -> Integer (607.0) -
IO#ioctl に委譲します。
IO#ioctl に委譲します。
@see IO#ioctl -
CSV
# col _ sep -> String (343.0) -
カラム区切り文字列として使用する文字列を返します。
..."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... -
CSV
# field _ size _ limit -> Integer (343.0) -
フィールドサイズの最大値を返します。
...csv"
csv = CSV.new(DATA)
csv.field_size_limit # => nil
p csv.read # => [["a", "b"], ["\n2\n2\n", ""]]
DATA.rewind
csv = CSV.new(DATA, field_size_limit: 4)
p csv.field_size_limit # => 4
csv.read # => #<CSV::MalformedCSVError: Field size exceeded on line 2.>
__END__
"a","b"
"
2
2
",""
//}
@see CSV...