別のキーワード
種類
- インスタンスメソッド (48)
- 文書 (48)
- 関数 (48)
ライブラリ
- ビルトイン (48)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (12) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
-
private
_ class _ method (24) -
rb
_ singleton _ class (12) -
rb
_ singleton _ class _ attached (12) -
rb
_ singleton _ class _ clone (12) -
rb
_ singleton _ class _ new (12) -
singleton
_ class? (12) - クラス/メソッドの定義 (12)
検索結果
先頭4件
-
Module
# private _ class _ method(names) -> self (12.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。
...mes 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
module Foo
def self.foo; end
end
Foo.singleton_class.private_method_defined?(:foo) # => false
Foo.private_class_method(:foo) # => Foo
Foo.singleton_class.private_method_defined?(:foo) # => true
//}... -
NEWS for Ruby 2
. 1 . 0 (6.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...: Module#using, which activates refinements of the specified module only
in the current class or module definition.
* 追加: Module#singleton_class? レシーバーが特異クラスであれば true を返します。
レシーバーが通常のクラスやモジュールであれ... -
Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (6.0)
-
Rubyで使われる記号の意味(正規表現の複雑な記号は除く) ex q num per and or plus minus ast slash hat sq period comma langl rangl eq tilde dollar at under lbrarbra lbra2rbra2 lbra3rbra3 dq colon ac backslash semicolon
...クラス定義でスーパークラスを指定しています。
d:spec/def#class。
: class << obj
特異クラス定義。d:spec/def#singleton_classを参照。
===[a:rangl] >
: 3 > 5
「より大きい」比較演算子
: 3 >= 5
「より大きいか等しい」比較演算子
: 3... -
Ruby用語集 (6.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...自身が属すクラスとは別に、オブジェクト固有の
クラスがあり、特異クラスと呼ばれる。
参照:Object#singleton_class
: 特異メソッド
: singleton method
オブジェクト固有のメソッド。
オブジェクトの特異クラスのインスタ...