8件ヒット
[1-8件を表示]
(0.072秒)
別のキーワード
種類
- 関数 (4)
- インスタンスメソッド (3)
- 文書 (1)
ライブラリ
- ビルトイン (3)
キーワード
- Ruby用語集 (1)
-
private
_ class _ method (1) -
rb
_ singleton _ class (1) -
rb
_ singleton _ class _ attached (1) -
rb
_ singleton _ class _ clone (1) -
rb
_ singleton _ class _ new (1) -
singleton
_ class? (1)
検索結果
先頭5件
-
Object
# singleton _ class -> Class (72658.0) -
レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。
レシーバの特異クラスを返します。
まだ特異クラスがなければ、新しく作成します。
レシーバが nil か true か false なら、それぞれ NilClass, TrueClass,
FalseClass を返します。
@raise TypeError レシーバが Integer、Float、Symbol の場合に発生します。
//emlist[][ruby]{
Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class #=> #<Class:String>
n... -
Module
# singleton _ class? -> bool (45658.0) -
self が特異クラスの場合に true を返します。そうでなければ false を返し ます。
self が特異クラスの場合に true を返します。そうでなければ false を返し
ます。
//emlist[例][ruby]{
class C
end
C.singleton_class? # => false
C.singleton_class.singleton_class? # => true
//} -
VALUE rb
_ singleton _ class(VALUE obj) (36901.0) -
obj に特異クラスを導入し、その特異クラスを返します。 すでに特異クラスが導入されているときはそれをそのまま返します。
obj に特異クラスを導入し、その特異クラスを返します。
すでに特異クラスが導入されているときはそれをそのまま返します。
obj が特異メソッドを定義できない型のオブジェクトである
ときは例外 TypeError を発生します。 -
VALUE rb
_ singleton _ class _ clone(VALUE klass) (36901.0) -
特異クラス klass を clone して返します。 klass が特異クラスでないときはただ klass を返します。
特異クラス klass を clone して返します。
klass が特異クラスでないときはただ klass を返します。 -
VALUE rb
_ singleton _ class _ new(VALUE super) (36901.0) -
super をスーパークラスとする特異クラスを生成し、返します。
super をスーパークラスとする特異クラスを生成し、返します。 -
void rb
_ singleton _ class _ attached(VALUE klass , VALUE obj) (36601.0) -
特異クラス klass にその唯一のインスタンス obj を結びつけます。
特異クラス klass にその唯一のインスタンス obj を結びつけます。 -
Module
# private _ class _ method(*name) -> self (18337.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。
name で指定したクラスメソッド (クラスの特異メソッド) の
可視性を private に変更します。
@param name 0 個以上の String または Symbol を指定します。
//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_define... -
Ruby用語集 (9019.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
Ruby用語集
A B C D E F G I J M N O R S Y
a ka sa ta na ha ma ya ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-based
番号が 0 から始まること。
例えば、
Array や Vector、Matrix などの要素の番号、
String における文字の位置、
といったものは 0 オリジンである。
: 1 オリジン
: one-based
...