るりまサーチ

最速Rubyリファレンスマニュアル検索!
88件ヒット [1-88件を表示] (0.102秒)
トップページ > クエリ:l[x] > クエリ:close[x] > クエリ:length[x]

別のキーワード

  1. kernel $-l
  2. matrix l
  3. _builtin $-l
  4. lupdecomposition l
  5. $-l kernel

ライブラリ

クラス

モジュール

キーワード

検索結果

Tempfile#length -> Integer (27207.0)

テンポラリファイルのサイズを返します。

...テンポラリファイルのサイズを返します。

require "tempfile"
tf = Tempfile.new("foo")
tf.print("bar,ugo")
p tf.size # => 7
tf.close
p tf.size # => 7...

Tempfile#size -> Integer (9007.0)

テンポラリファイルのサイズを返します。

...テンポラリファイルのサイズを返します。

require "tempfile"
tf = Tempfile.new("foo")
tf.print("bar,ugo")
p tf.size # => 7
tf.close
p tf.size # => 7...

Zlib::GzipReader#read(length = nil) -> String | nil (3213.0)

IO クラスの同名メソッドIO#readと同じです。

...IO クラスの同名メソッドIO#readと同じです。

但し、gzip ファイル中に
エラーがあった場合 Zlib::Error 例外や
Zlib::GzipFile::Error 例外が発生します。

gzip ファイルのフッターの処理に注意して下さい。
gzip ファイルのフッターに...
...合は
Zlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError,
Zlib::GzipFile::LengthError 例外を発生させます。

* EOF (圧縮データの最後) を越えて読み込み要求を受けた時。
すなわち Zlib::GzipReader#read,
Zlib::GzipReader#gets メソッド等が nil を返...
...す時。
* EOF まで読み込んだ後、Zlib::GzipFile#close メソッドが
呼び出された時。
* EOF まで読み込んだ後、Zlib::GzipReader#unused メソッドが
呼び出された時。

@param length 読み込む文字列の文字数を整数で指定します。...

PrettyPrint#group(indent = 0, open_obj = '', close_obj = '', open_width = open_obj.length, close_width = close_obj.length) {...} -> () (835.0)

与えられたブロックを実行します。 ブロック内で自身に追加される文字列やオブジェクトは、1行にまとめて表示しても よい同じグループに属すると仮定されます。

...当します。

同じノード内で呼ばれた breakable は、改行するならば全て同時に改行します。

@param indent グループのインデントの深さを指定します。

@param open_obj 指定された場合、self.text(open_obj, open_width) がブロックが...
...aram close_obj 指定された場合、self.text(close_obj, close_width) がブロックが
実行された後に呼ばれます。閉じ括弧などを出力するのに使用されます。

@param open_width open_obj のカラムを指定します。

@param close_width close_obj...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) -> StringIO (136.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...します。ブロックの終了時に StringIO は close されます。nil を返します。

require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与...
...ンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバー...
...('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列:...

絞り込み条件を変える

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) {|sio| ... } -> nil (136.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...します。ブロックの終了時に StringIO は close されます。nil を返します。

require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与...
...ンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバー...
...('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列:...

CGI#header(options = "text/html") -> String (130.0)

HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。

...ずに自力で HTML を出力したい場合などに使います。
このメソッドは文字列エンコーディングを変換しません。

ヘッダのキーとしては以下が利用可能です。

: type
Content-Type ヘッダです。デフォルトは "text/html" です。
: chars...
...ます。Connection ヘッダに対応します。
: length
送信するコンテンツの長さを指定します。Content-Length ヘッダに対応します。
: language
送信するコンテンツの言語を指定します。Content-Language ヘッダに対応します。
: expires
...
...der("text/plain")
# Content-Type: text/plain

header({"nph" => true,
"status" => "OK", # == "200 OK"
# "status" => "200 GOOD",
"server" => ENV['SERVER_SOFTWARE'],
"connection" => "close",...

CGI#out(options = "text/html") { .... } (118.0)

HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。

...を自動変換し、language を "ja"にします。

@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。

例:
cgi = CGI.new
cgi.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#...
...# string

cgi.out("text/plain"){ "string" }
# Content-Type: text/plain
# Content-Length: 6
#
# string

cgi.out({"nph" => true,
"status" => "OK", # == "200 OK"
"server" => ENV['SERVER_SOFTWARE...
...'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24...