検索結果
先頭5件
- StringIO
. new(string = & # 39;& # 39; , mode = & # 39;r+& # 39;) -> StringIO - StringIO
. open(string = & # 39;& # 39; , mode = & # 39;r+& # 39;) -> StringIO - StringIO
. open(string = & # 39;& # 39; , mode = & # 39;r+& # 39;) {|io| . . . } -> object - OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO - URI
. open(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO | Tempfile | IO
-
StringIO
. new(string = & # 39;& # 39; , mode = & # 39;r+& # 39;) -> StringIO (24388.0) -
StringIO オブジェクトを生成して返します。
...
StringIO オブジェクトを生成して返します。
与えられた string がフリーズされている場合には、mode はデフォルトでは読み取りのみに設定されます。
ブロックを与えた場合は生成した StringIO オブジェクトを引数としてブロッ......価してその結果を返します。
@param string 生成される StringIO のデータを文字列で指定します。
この文字列はバッファとして使われます。StringIO#write などによって、
string 自身も書き換えられます。
@param......字列か整数で指定します。
@raise Errno::EACCES string がフリーズされていて、mode が書き込み可能に設定されている場合に発生します。
//emlist[例][ruby]{
require 'stringio'
s = "foo"
io = StringIO.new(s)
p io.getc # => 102
p io.pos # => 1
p... -
StringIO
. open(string = & # 39;& # 39; , mode = & # 39;r+& # 39;) -> StringIO (24388.0) -
StringIO オブジェクトを生成して返します。
...
StringIO オブジェクトを生成して返します。
与えられた string がフリーズされている場合には、mode はデフォルトでは読み取りのみに設定されます。
ブロックを与えた場合は生成した StringIO オブジェクトを引数としてブロッ......価してその結果を返します。
@param string 生成される StringIO のデータを文字列で指定します。
この文字列はバッファとして使われます。StringIO#write などによって、
string 自身も書き換えられます。
@param......字列か整数で指定します。
@raise Errno::EACCES string がフリーズされていて、mode が書き込み可能に設定されている場合に発生します。
//emlist[例][ruby]{
require 'stringio'
s = "foo"
io = StringIO.new(s)
p io.getc # => 102
p io.pos # => 1
p... -
StringIO
. open(string = & # 39;& # 39; , mode = & # 39;r+& # 39;) {|io| . . . } -> object (24188.0) -
StringIO オブジェクトを生成して返します。
...
StringIO オブジェクトを生成して返します。
与えられた string がフリーズされている場合には、mode はデフォルトでは読み取りのみに設定されます。
ブロックを与えた場合は生成した StringIO オブジェクトを引数としてブロッ......価してその結果を返します。
@param string 生成される StringIO のデータを文字列で指定します。
この文字列はバッファとして使われます。StringIO#write などによって、
string 自身も書き換えられます。
@param......字列か整数で指定します。
@raise Errno::EACCES string がフリーズされていて、mode が書き込み可能に設定されている場合に発生します。
//emlist[例][ruby]{
require 'stringio'
s = "foo"
io = StringIO.new(s)
p io.getc # => 102
p io.pos # => 1
p... -
OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO (236.0) -
URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。
...る文字列 name のリソースを取得して StringIO オブジェクト
として返します。
ブロックを与えた場合は StringIO オブジェクトを引数としてブロックを
評価します。ブロックの終了時に StringIO は close されます。nil を返します。......。Kernel.#open と同じです。
@param perm 無視されます。
@param options ハッシュを与えます。
@return 返り値である StringIO オブジェクトは OpenURI::Meta モジュールで extend されています。
@raise OpenURI::HTTPError 対象となる URI のスキーム... -
URI
. open(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO | Tempfile | IO (224.0) -
name が http:// や https://、ftp:// で始まっている文字列なら URI のリソースを 取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。 返されるオブジェクトは OpenURI::Meta モジュールで extend されています。
...name が http:// や https://、ftp:// で始まっている文字列なら URI のリソースを
取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。
返されるオブジェクトは OpenURI::Meta モジュールで extend されています......は上の場合と同様、name が http:// や https://、ftp:// で
始まっている文字列なら URI のリソースを取得した上で StringIO オブジェクト
または Tempfile オブジェクトを引数としてブロックを評価します。後は同様です。
引数のオブ... -
Psych
. dump(o , options = {}) -> String (126.0) -
Ruby のオブジェクト o を YAML ドキュメントに変換します。
...ons 出力オプション
//emlist[例][ruby]{
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
# Dump an array to an IO object
Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
# Dump an array with indentation set
Psych.dump(['a', ['b']......], :indentation => 3) # => "---\n- a\n- - b\n"
# Dump an array to an IO with indentation set
Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
//}... -
CSV
. new(data , options = Hash . new) -> CSV (47.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...このメソッドは CSV ファイルを読み込んだり、書き出したりするために
String か IO のインスタンスをラップします。
ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用し......たい場合はあらかじめそのように設定した StringIO を渡してください。
@param data String か IO のインスタンスを指定します。
String のインスタンスを指定した場合、CSV#string を使用して
後からデータを取り出......ll be used as the line-ending translation can cause
problems with resetting the document position to where it was before the
read ahead. This String will be transcoded into the data's Encoding before parsing.
: :quote_char
フィールドをクオートする文字を指定します。長... -
Psych
. dump(o , io , options = {}) -> () (26.0) -
Ruby のオブジェクト o を YAML ドキュメントに変換します。
...ons 出力オプション
//emlist[例][ruby]{
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
# Dump an array to an IO object
Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
# Dump an array with indentation set
Psych.dump(['a', ['b']......], :indentation => 3) # => "---\n- a\n- - b\n"
# Dump an array to an IO with indentation set
Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
//}... -
CSV
. open(filename , mode = "rb" , options = Hash . new) -> CSV (13.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File#path
* IO#pid
* IO#pos
* IO#pos=
* IO#reopen
* IO#seek
* IO#stat
* StringIO#string
* IO#sync
* IO#sync=
* IO#tell
* IO#to_i
* IO#to_io
* File#truncate
* IO#tty?
@param filename ファイル名を指定しま...