別のキーワード
種類
- 特異メソッド (96)
- インスタンスメソッド (12)
クラス
-
ARGF
. class (12) - CSV (48)
- IO (48)
検索結果
先頭5件
-
ARGF
. class # internal _ encoding -> Encoding | nil (18125.0) -
ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...例:
# $ ruby -Eutf-8 test.rb
# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('utf-8','ascii')
ARGF.internal_encoding # => #<Encoding:US-ASCII>
例:
ARGF.binmode
ARGF.internal_encoding # => nil
@see IO, ARGF.class#external_e... -
IO
. for _ fd(fd , mode = "r" , **opts) -> IO (24.0) -
オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。
...す
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
別名です。
* :internal_encoding 内部エンコーディング。"-" はデフォルト内部エンコーディングの
別名です。nilなら変換しません。......形で外部/内部エンコーディングを指定します。
* :textmode 真を渡すと mode の "t" と同じ意味になります。
* :binmode 真を渡すと mode の "b" と同じ意味になります。
* :autoclose 偽を渡すと close時/GCでのファイナライザ呼出時に......y]{
IO.binwrite("testfile", "\xBF\xAA\x16\x04.\b\xCB\x12\xACoeQ\xFDv2\xCF9+\x81\x18")
io = IO.for_fd(IO.sysopen("testfile"), "r", binmode: true)
io.class # => IO
io.binmode? # => true
io.close
//}
//emlist[例:IO.open によるファイルオープン][ruby]{
IO.open(IO.sysopen("testfile")) { |io|... -
IO
. new(fd , mode = "r" , **opts) -> IO (24.0) -
オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。
...す
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
別名です。
* :internal_encoding 内部エンコーディング。"-" はデフォルト内部エンコーディングの
別名です。nilなら変換しません。......形で外部/内部エンコーディングを指定します。
* :textmode 真を渡すと mode の "t" と同じ意味になります。
* :binmode 真を渡すと mode の "b" と同じ意味になります。
* :autoclose 偽を渡すと close時/GCでのファイナライザ呼出時に......y]{
IO.binwrite("testfile", "\xBF\xAA\x16\x04.\b\xCB\x12\xACoeQ\xFDv2\xCF9+\x81\x18")
io = IO.for_fd(IO.sysopen("testfile"), "r", binmode: true)
io.class # => IO
io.binmode? # => true
io.close
//}
//emlist[例:IO.open によるファイルオープン][ruby]{
IO.open(IO.sysopen("testfile")) { |io|... -
IO
. open(fd , mode = "r" , **opts) -> IO (24.0) -
オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。
...す
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
別名です。
* :internal_encoding 内部エンコーディング。"-" はデフォルト内部エンコーディングの
別名です。nilなら変換しません。......形で外部/内部エンコーディングを指定します。
* :textmode 真を渡すと mode の "t" と同じ意味になります。
* :binmode 真を渡すと mode の "b" と同じ意味になります。
* :autoclose 偽を渡すと close時/GCでのファイナライザ呼出時に......y]{
IO.binwrite("testfile", "\xBF\xAA\x16\x04.\b\xCB\x12\xACoeQ\xFDv2\xCF9+\x81\x18")
io = IO.for_fd(IO.sysopen("testfile"), "r", binmode: true)
io.class # => IO
io.binmode? # => true
io.close
//}
//emlist[例:IO.open によるファイルオープン][ruby]{
IO.open(IO.sysopen("testfile")) { |io|... -
IO
. open(fd , mode = "r" , **opts) {|io| . . . } -> object (24.0) -
オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。
...す
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
別名です。
* :internal_encoding 内部エンコーディング。"-" はデフォルト内部エンコーディングの
別名です。nilなら変換しません。......形で外部/内部エンコーディングを指定します。
* :textmode 真を渡すと mode の "t" と同じ意味になります。
* :binmode 真を渡すと mode の "b" と同じ意味になります。
* :autoclose 偽を渡すと close時/GCでのファイナライザ呼出時に......y]{
IO.binwrite("testfile", "\xBF\xAA\x16\x04.\b\xCB\x12\xACoeQ\xFDv2\xCF9+\x81\x18")
io = IO.for_fd(IO.sysopen("testfile"), "r", binmode: true)
io.class # => IO
io.binmode? # => true
io.close
//}
//emlist[例:IO.open によるファイルオープン][ruby]{
IO.open(IO.sysopen("testfile")) { |io|... -
CSV
. open(filename , mode = "rb" , options = Hash . new) -> CSV (18.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...File に委譲します。
* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* Fil... -
CSV
. open(filename , mode = "rb" , options = Hash . new) {|csv| . . . } -> nil (18.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...File に委譲します。
* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* Fil... -
CSV
. open(filename , options = Hash . new) -> CSV (18.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...File に委譲します。
* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* Fil... -
CSV
. open(filename , options = Hash . new) {|csv| . . . } -> nil (18.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...File に委譲します。
* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* Fil...