るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dsa p
  5. kernel p

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Tempfile#length -> Integer (21114.0)

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

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

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

Net::HTTPHeader#length -> Integer (21102.0)

このメソッドは obsolete です。

このメソッドは obsolete です。

ヘッダフィールドの数を返します。

Net::POPMail#length -> Integer (21102.0)

メールのサイズ (単位はバイト) をかえします。

メールのサイズ (単位はバイト) をかえします。

REXML::Parent#length -> Integer (21102.0)

保持している子ノードの数を返します。

保持している子ノードの数を返します。

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...

絞り込み条件を変える

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
//}...

Array#length -> Integer (18108.0)

配列の長さを返します。配列が空のときは 0 を返します。

...配列の長さを返します。配列が空のときは 0 を返します。

//emlist[例][ruby]{
p
[1, nil, 3, nil].size #=> 4
//}...

MatchData#length -> Integer (18108.0)

部分文字列の数を返します(self.to_a.size と同じです)。

...部分文字列の数を返します(self.to_a.size と同じです)。

//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p
$~.size # => 4
//}...

Set#length -> Integer (18108.0)

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

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

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

Array#repeated_permutation(n) -> Enumerator (12208.0)

サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。

...オブジェクトを返します。

@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙...
...a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).to_a #=> [[]] # one perm...
...utation of length 0
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1...

絞り込み条件を変える

<< 1 2 3 ... > >>