種類
- インスタンスメソッド (804)
- 特異メソッド (216)
- 定数 (36)
- クラス (12)
- 文書 (5)
クラス
- CSV (408)
-
CSV
:: FieldInfo (36) -
CSV
:: Row (48) -
CSV
:: Table (108) - Socket (12)
-
URI
:: Generic (12) -
URI
:: MailTo (24) -
WIN32OLE
_ PARAM (12)
モジュール
- Kernel (384)
-
Socket
:: Constants (12)
キーワード
-
DEFAULT
_ OPTIONS (12) - HTTPHeaderSyntaxError (12)
-
IPV6
_ RTHDR (24) -
NEWS for Ruby 3
. 0 . 0 (5) -
check
_ signedness (24) -
check
_ sizeof (24) -
col
_ sep (12) - component (12)
- convert (36)
-
convertible
_ int (24) - each (12)
- empty? (12)
- encoding (12)
- fields (12)
- filter (36)
-
find
_ type (24) - generate (12)
-
have
_ func (24) -
have
_ header (24) -
have
_ library (24) -
have
_ macro (24) -
have
_ struct _ member (24) -
have
_ type (24) -
have
_ var (24) - header (12)
-
header
_ convert (36) -
header
_ converters (12) -
header
_ row? (12) - headers= (12)
- index (12)
- inspect (12)
- instance (24)
- length (12)
- line (12)
- new (24)
- open (48)
- output? (12)
- parse (24)
- push (12)
- read (24)
- readlines (24)
-
return
_ headers? (12) - size (12)
- table (12)
-
to
_ csv (12) -
to
_ s (12) -
try
_ constant (24) -
try
_ func (24) -
try
_ static _ assert (24) -
try
_ type (24) -
try
_ var (24) -
unconverted
_ fields? (12) -
values
_ at (24) -
write
_ headers? (12)
検索結果
先頭5件
-
CSV
# headers -> Array | true | nil (24225.0) -
nil を返した場合は、ヘッダは使用されません。 真を返した場合は、ヘッダを使用するが、まだ読み込まれていません。 配列を返した場合は、ヘッダは既に読み込まれています。
...は既に読み込まれています。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2")
csv.headers # => nil
csv = CSV.new("header1,header2\nrow1_1,row1_2", headers: true)
csv.headers # => true
csv.read
csv.headers # =>["header1", "header2"]
//}
@see CSV.new... -
CSV
:: Row # headers -> Array (24207.0) -
この行のヘッダのリストを返します。
...この行のヘッダのリストを返します。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2"], [1, 2])
row.headers # => ["header1", "header2"]
//}... -
CSV
:: Table # headers -> Array (24207.0) -
自身のヘッダ行を返します。
...自身のヘッダ行を返します。
テーブルが空である場合は空の配列を返します。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
table = CSV::Table.new([row])
table.headers # => ["header1", "header2"]
//}... -
URI
:: MailTo # headers -> [[String]] (24207.0) -
自身のヘッダーを文字列の配列の配列として設定します。
...自身のヘッダーを文字列の配列の配列として設定します。
例:
require 'uri'
m = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
p m.headers #=> [["subject", "subscribe"], ["cc", "myaddr"]]... -
CSV
# write _ headers? -> bool (12243.0) -
ヘッダを出力先に書き込む場合は真を返します。 そうでない場合は偽を返します。
...//emlist[例][ruby]{
require "csv"
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10")
csv.write_headers? # => nil
header = ["header1", "header2"]
row = ["row1_1", "row1_2"]
result = CSV.generate(headers: header, write_headers: false) do |csv|
csv.write_headers? # => false
csv << row
end
resu......lt # => "row1_1,row1_2\n"
result = CSV.generate(headers: header, write_headers: true) do |csv|
csv.write_headers? # => true
csv << row
end
result # => "header1,header2\nrow1_1,row1_2\n"
//}
@see CSV.new... -
CSV
# return _ headers? -> bool (12237.0) -
ヘッダを返す場合は、真を返します。 そうでない場合は、偽を返します。
...emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2", headers: true, return_headers: false)
csv.return_headers? # => false
csv.shift # => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
csv = CSV.new("header1,header2\nrow1_1,row1_2", headers: true, return_headers: true......)
csv.return_headers? # => true
csv.shift # => #<CSV::Row "header1":"header1" "header2":"header2">
//}
@see CSV.new... -
URI
:: MailTo # headers=(s) (12207.0) -
自身のヘッダーを文字列で設定します。
...を文字列で設定します。
@param s ヘッダーを表す文字列を指定します。
@raise URI::InvalidComponentError 不正な引数 s に対して発生します。
例:
require 'uri'
m = URI.parse("mailto:nospam@example.com")
m.headers = URI.escape("subject=hello hello")... -
Net
:: HTTPHeaderSyntaxError (12000.0) -
HTTP ヘッダの内容が不正である場合に発生する例外です。
HTTP ヘッダの内容が不正である場合に発生する例外です。 -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (9318.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
...Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p......assed as preprocessor constants to the
compiler using the +type+ name, in uppercase.
* 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X'
is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP,
where 'TYP' is the +type+ name in uppercase with replacing '_t'
suff......ollowed by '=X' where 'X' is the macro name to
convert +type+ to +Integer+ object, and vice versa.
For example, if foobar_t is defined as unsigned long, then
convertible_int("foobar_t") would return "unsigned long", and define
macros:
#define TYPEOF_FOOBAR_T unsigned long
#define FOO...