るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
39件ヒット [1-39件を表示] (0.035秒)
トップページ > バージョン:2.6.0[x] > クエリ:io[x] > クエリ:CSV[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

ライブラリ

クラス

キーワード

検索結果

CSV#to_io -> self (81439.0)

IO#to_io に委譲します。

IO#to_io に委譲します。


@see IO#to_io

CSV#ioctl(cmd, arg = 0) -> Integer (81370.0)

IO#ioctl に委譲します。

IO#ioctl に委譲します。


@see IO#ioctl

CSV#gets -> Array | CSV::Row (63517.0)

String や IO をラップしたデータソースから一行だけ読み込んで フィールドの配列か CSV::Row のインスタンスを返します。

String や IO をラップしたデータソースから一行だけ読み込んで
フィールドの配列か CSV::Row のインスタンスを返します。

データソースは読み込み用にオープンされている必要があります。

@return ヘッダを使用しない場合は配列を返します。
ヘッダを使用する場合は CSV::Row を返します。

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

csv = CSV.new(DATA.read)
csv.readline # => ["header1", "header2"]
csv.readline # => ["row1_1", "r...

CSV#readline -> Array | CSV::Row (63517.0)

String や IO をラップしたデータソースから一行だけ読み込んで フィールドの配列か CSV::Row のインスタンスを返します。

String や IO をラップしたデータソースから一行だけ読み込んで
フィールドの配列か CSV::Row のインスタンスを返します。

データソースは読み込み用にオープンされている必要があります。

@return ヘッダを使用しない場合は配列を返します。
ヘッダを使用する場合は CSV::Row を返します。

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

csv = CSV.new(DATA.read)
csv.readline # => ["header1", "header2"]
csv.readline # => ["row1_1", "r...

CSV#shift -> Array | CSV::Row (63517.0)

String や IO をラップしたデータソースから一行だけ読み込んで フィールドの配列か CSV::Row のインスタンスを返します。

String や IO をラップしたデータソースから一行だけ読み込んで
フィールドの配列か CSV::Row のインスタンスを返します。

データソースは読み込み用にオープンされている必要があります。

@return ヘッダを使用しない場合は配列を返します。
ヘッダを使用する場合は CSV::Row を返します。

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

csv = CSV.new(DATA.read)
csv.readline # => ["header1", "header2"]
csv.readline # => ["row1_1", "r...

絞り込み条件を変える

CSV#reopen(io) -> self (63373.0)

IO#reopen に委譲します。

IO#reopen に委譲します。


@see IO#reopen

CSV#seek(offset, whence = IO::SEEK_SET) -> 0 (63373.0)

IO#seek に委譲します。

IO#seek に委譲します。


@see IO#seek

CSV#flock(operation) -> 0 | false (63304.0)

File#flock に委譲します。

File#flock に委譲します。

CSV#rewind -> 0 (63262.0)

IO#rewind に似ています。CSV#lineno を 0 にします。

IO#rewind に似ています。CSV#lineno を 0 にします。

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

csv = CSV.new("header1,header2\nrow1_1,row1_2")
csv.lineno # => 0
csv.readline
csv.lineno # => 1
csv.rewind
csv.lineno # => 0
//}

@see IO#rewind

CSV#eof -> bool (63136.0)

IO#eof, IO#eof? に委譲します。

IO#eof, IO#eof? に委譲します。


@see IO#eof, IO#eof?

絞り込み条件を変える

CSV#eof? -> bool (63136.0)

IO#eof, IO#eof? に委譲します。

IO#eof, IO#eof? に委譲します。


@see IO#eof, IO#eof?

CSV#isatty -> bool (63136.0)

IO#isatty, IO#tty? に委譲します。

IO#isatty, IO#tty? に委譲します。


@see IO#isatty, IO#tty?

CSV#pos -> Integer (63136.0)

IO#pos, IO#tell に委譲します。

IO#pos, IO#tell に委譲します。


@see IO#pos, IO#tell

CSV#tell -> Integer (63136.0)

IO#pos, IO#tell に委譲します。

IO#pos, IO#tell に委譲します。


@see IO#pos, IO#tell

CSV#tty? -> bool (63136.0)

IO#isatty, IO#tty? に委譲します。

IO#isatty, IO#tty? に委譲します。


@see IO#isatty, IO#tty?

絞り込み条件を変える

CSV#inspect -> String (63112.0)

ASCII 互換文字列で自身の情報を表したものを返します。

ASCII 互換文字列で自身の情報を表したものを返します。

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

csv = CSV.new("header1,header2\nrow1_1,row1_2")
csv.inspect # => "<#CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:\",\" row_sep:\"\\n\" quote_char:\"\\\"\">"
//}

CSV#fileno -> Integer (63100.0)

IO#fileno, IO#to_i に委譲します。

IO#fileno, IO#to_i に委譲します。

CSV#to_i -> Integer (63100.0)

IO#fileno, IO#to_i に委譲します。

IO#fileno, IO#to_i に委譲します。

CSV#binmode -> self (63070.0)

IO#binmode に委譲します。

IO#binmode に委譲します。


@see IO#binmode

CSV#binmode? -> bool (63070.0)

IO#binmode? に委譲します。

IO#binmode? に委譲します。


@see IO#binmode?

絞り込み条件を変える

CSV#close -> nil (63070.0)

IO#close に委譲します。

IO#close に委譲します。


@see IO#close

CSV#close_read -> nil (63070.0)

IO#close_read に委譲します。

IO#close_read に委譲します。


@see IO#close_read

CSV#close_write -> nil (63070.0)

IO#close_write に委譲します。

IO#close_write に委譲します。


@see IO#close_write

CSV#closed? -> bool (63070.0)

IO#closed? に委譲します。

IO#closed? に委譲します。


@see IO#closed?

CSV#internal_encoding -> Encoding | nil (63070.0)

IO#internal_encoding に委譲します。

IO#internal_encoding に委譲します。


@see IO#internal_encoding

絞り込み条件を変える

CSV#path -> String (63070.0)

IO#path に委譲します。

IO#path に委譲します。


@see IO#path

CSV#pid -> Integer | nil (63070.0)

IO#pid に委譲します。

IO#pid に委譲します。


@see IO#pid

CSV#pos=(n) (63070.0)

IO#pos= に委譲します。

IO#pos= に委譲します。


@see IO#pos=

CSV#stat -> File::Stat (63070.0)

IO#stat に委譲します。

IO#stat に委譲します。


@see IO#stat

CSV#sync -> bool (63070.0)

IO#sync に委譲します。

IO#sync に委譲します。


@see IO#sync

絞り込み条件を変える

CSV#sync=(newstate) (63070.0)

IO#sync= に委譲します。

IO#sync= に委譲します。


@see IO#sync=

CSV#external_encoding -> Encoding | nil (63052.0)

IO#external_encoding に委譲します。

IO#external_encoding に委譲します。

CSV#fcntl(cmd, arg = 0) -> Integer (63052.0)

IO#fcntl に委譲します。

IO#fcntl に委譲します。

CSV#flush -> self (63052.0)

IO#flush に委譲します。

IO#flush に委譲します。

CSV#fsync -> 0 | nil (63052.0)

IO#fsync に委譲します。

IO#fsync に委譲します。

絞り込み条件を変える

CSV::Table#to_csv(options = Hash.new) -> String (27763.0)

CSV の文字列に変換して返します。

CSV の文字列に変換して返します。

ヘッダを一行目に出力します。その後に残りのデータを出力します。

デフォルトでは、ヘッダを出力します。オプションに :write_headers =>
false を指定するとヘッダを出力しません。

//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.to_csv # => "a,b,c\n1,2,3\n"
p table.to_csv(write_head...

String#parse_csv(**options) -> [String] (18853.0)

CSV.parse_line(self, options) と同様です。

CSV.parse_line(self, options) と同様です。

1 行の CSV 文字列を、文字列の配列に変換するためのショートカットです。

@param options CSV.new と同様のオプションを指定します。

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

p "Matz,Ruby\n".parse_csv # => ["Matz", "Ruby"]
p "Matz|Ruby\r\n".parse_csv(col_sep: '|', row_sep: "\r\n") # => ...

Array#to_csv(**options) -> String (18763.0)

CSV.generate_line(self, options) と同様です。

CSV.generate_line(self, options) と同様です。

Array オブジェクトを 1 行の CSV 文字列に変換するためのショートカットです。

@param options CSV.generate_line と同様のオプションを指定します。

//emlist[][ruby]{
require 'csv'

p [1, 'Matz', :Ruby, Date.new(1965, 4, 14)].to_csv # => "1,Matz,Ruby,1965-04-14\n"
p [1, 'Matz',...

CSV::Table#to_s(options = Hash.new) -> String (18463.0)

CSV の文字列に変換して返します。

CSV の文字列に変換して返します。

ヘッダを一行目に出力します。その後に残りのデータを出力します。

デフォルトでは、ヘッダを出力します。オプションに :write_headers =>
false を指定するとヘッダを出力しません。

//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.to_csv # => "a,b,c\n1,2,3\n"
p table.to_csv(write_head...