るりまサーチ

最速Rubyリファレンスマニュアル検索!
1256件ヒット [1-100件を表示] (0.053秒)
トップページ > クエリ:un[x] > ライブラリ:ビルトイン[x]

別のキーワード

  1. socket sockaddr_un
  2. socket pack_sockaddr_un
  3. socket unpack_sockaddr_un
  4. un ln
  5. un mv

クラス

モジュール

検索結果

<< 1 2 3 ... > >>

UnboundMethod (12002.0)

レシーバを持たないメソッドを表すクラスです。 呼び出すためにはレシーバにバインドする必要があります。

...す。

Module#instance_method や
Method#unbind により生成し、後で
Un
boundMethod#bind によりレシーバを
割り当てた Method オブジェクトを作ることができます。

//emlist[例: Method クラスの冒頭にある例を UnboundMethod で書くと以下のようにな...
...thods[2].bind(Foo.new).call # => "bar"
p methods[3].bind(Foo.new).call # => "baz"
//}

//emlist[例: 以下はメソッドの再定義を UnboundMethod を使って行う方法です。普通は alias や super を使います。][ruby]{
class Foo
def foo
p :foo
end
@@orig_foo =...

Method#unbind -> UnboundMethod (6302.0)

self のレシーバとの関連を取り除いた UnboundMethod オブ ジェクトを生成して返します。

...との関連を取り除いた UnboundMethod オブ
ジェクトを生成して返します。

//emlist[例][ruby]{
class Foo
def foo
"foo"
end
end

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
un
bound_method = m.unbind # => #<UnboundMethod: Foo#foo>
un
bound_method.bind(Foo.new) # => #<...

UnboundMethod#clone -> UnboundMethod (6202.0)

自身を複製した UnboundMethod オブジェクトを作成して返します。

...自身を複製した UnboundMethod オブジェクトを作成して返します。

//emlist[例][ruby]{
a = String.instance_method(:size)
b = a.clone

a == b # => true
//}...

UnboundMethod#super_method -> UnboundMethod | nil (6202.0)

self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ クトにして返します。

...self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ
クトにして返します。


@see Method#super_method...

File::Constants::LOCK_UN -> Integer (6103.0)

アンロック。File#flock で使用します。

アンロック。File#flock で使用します。

絞り込み条件を変える

Array#count -> Integer (6102.0)

レシーバの要素数を返します。

...ブロックを評価して真になった要素の個数を
カウントして返します。

@param item カウント対象となる値。

//emlist[例][ruby]{
ary = [1, 2, 4, 2.0]
ary.count # => 4
ary.count(2) # => 2
ary.count{|x|x%2==0} # => 3
//}

@see Enumerable#count...

Array#count {|obj| ... } -> Integer (6102.0)

レシーバの要素数を返します。

...ブロックを評価して真になった要素の個数を
カウントして返します。

@param item カウント対象となる値。

//emlist[例][ruby]{
ary = [1, 2, 4, 2.0]
ary.count # => 4
ary.count(2) # => 2
ary.count{|x|x%2==0} # => 3
//}

@see Enumerable#count...

Array#count(item) -> Integer (6102.0)

レシーバの要素数を返します。

...ブロックを評価して真になった要素の個数を
カウントして返します。

@param item カウント対象となる値。

//emlist[例][ruby]{
ary = [1, 2, 4, 2.0]
ary.count # => 4
ary.count(2) # => 2
ary.count{|x|x%2==0} # => 3
//}

@see Enumerable#count...

Array#union(*other_arrays) -> Array (6102.0)

集合の和演算です。self と other_arrays の配列にどれかに含まれる要素を 全て含む新しい配列を返します。重複する要素は取り除かれます。

...ect#hash により行われます。

@param other_arrays 0個以上の配列を指定します。

//emlist[例][ruby]{
["a", "b", "c"].union([ "c", "d", "a" ]) #=> ["a", "b", "c", "d"]
["a"].union(["e", "b"], ["a", "c", "b"]) #=> ["a", "e", "b", "c"]
["a"].union # => ["a"]
//}

@see Array#|...
<< 1 2 3 ... > >>