るりまサーチ

最速Rubyリファレンスマニュアル検索!
520件ヒット [1-100件を表示] (0.122秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

CSV::Table#length -> Integer (18120.0)

(ヘッダを除く)行数を返します。

...(ヘッダを除く)行数を返します。

Array#length, Array#size に委譲しています。

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

@see Array#length, Array#size...

Digest::Base#length -> Integer (18115.0)

ダイジェストのハッシュ値のバイト長を取得します。 例えば、Digest::MD5であれば16、Digest::SHA1であれば20です。

...り、
それぞれの実装に適したものにオーバーライドされます。

例: Digest::MD、Digest::SHA1、Digest::SHA512のハッシュ値のバイト長を順番に調べる。

require
'digest'
["MD5", "SHA1", "SHA512"].map{|a| Digest(a).new().digest_length } # => [16, 20, 64]...

REXML::Attributes#length -> Integer (18114.0)

属性の個数を返します。

...ます。


//emlist[][ruby]{
require
'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p a.attributes.length # => 3
//}...

Thread::Queue#length -> Integer (18114.0)

キューの長さを返します。

...キューの長さを返します。

//emlist[例][ruby]{
require
'thread'
q = Queue.new

[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }

q.length # => 4
//}...

Set#length -> Integer (18108.0)

集合の要素数を返します。

...集合の要素数を返します。

//emlist[][ruby]{
require
'set'
p Set[10, 20, 30, 10].size # => 3
//}...

絞り込み条件を変える

Tempfile#length -> Integer (18108.0)

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

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

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

WEBrick::HTTPResponse#content_length -> Integer | nil (6185.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実...
...ジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バイトだけ読み込みそれを...
...nt-Length ヘッダを送ってはいけない場合に当てはまる時には
content_length の値は無視され Content-Length ヘッダはレスポンスに含まれません。

@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。

require
'...

WEBrick::HTTPResponse#content_length=(len) (6185.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実...
...ジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バイトだけ読み込みそれを...
...nt-Length ヘッダを送ってはいけない場合に当てはまる時には
content_length の値は無視され Content-Length ヘッダはレスポンスに含まれません。

@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。

require
'...

Net::HTTPHeader#content_length=(len) (6148.0)

Content-Length: ヘッダフィールドに値を設定します。

...Content-Length: ヘッダフィールドに値を設定します。

len に nil を与えると Content-Length: ヘッダフィールドを
削除します。

@param len 設定する値を整数で与えます。

//emlist[例][ruby]{
require
'net/http'

uri = URI.parse('http://www.example.com/ind...
...ex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10 # => 10
req.content_length # => 10
//}...

Net::HTTPHeader#content_length -> Integer|nil (6142.0)

Content-Length: ヘッダフィールドの表している値を整数で返します。

...Content-Length: ヘッダフィールドの表している値を整数で返します。

ヘッダが設定されていない場合には nil を返します。

@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。...
...//emlist[例][ruby]{
require
'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10
req.content_length # => 10
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>