るりまサーチ

最速Rubyリファレンスマニュアル検索!
108件ヒット [1-100件を表示] (0.027秒)
トップページ > クエリ:to[x] > クエリ:singleton_class[x]

別のキーワード

  1. singleton clone
  2. singleton dup
  3. singleton instance
  4. object define_singleton_method
  5. _builtin define_singleton_method

検索結果

<< 1 2 > >>

Object#singleton_class -> Class (24219.0)

レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。

...します。

@raise TypeError レシーバが Integer、Float、Symbol の場合に発生します。

//emlist[][ruby]{
Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class #=> #<Class:String>
nil.singleton_class #=> NilClass
//}

@see Object#class...

Module#singleton_class? -> bool (12219.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) (12200.0)

obj に特異クラスを導入し、その特異クラスを返します。 すでに特異クラスが導入されているときはそれをそのまま返します。

obj に特異クラスを導入し、その特異クラスを返します。
すでに特異クラスが導入されているときはそれをそのまま返します。

obj が特異メソッドを定義できない型のオブジェクトである
ときは例外 TypeError を発生します。

VALUE rb_singleton_class_clone(VALUE klass) (12200.0)

特異クラス klass を clone して返します。 klass が特異クラスでないときはただ klass を返します。

特異クラス klass を clone して返します。
klass が特異クラスでないときはただ klass を返します。

VALUE rb_singleton_class_new(VALUE super) (12200.0)

super をスーパークラスとする特異クラスを生成し、返します。

super をスーパークラスとする特異クラスを生成し、返します。

絞り込み条件を変える

void rb_singleton_class_attached(VALUE klass, VALUE obj) (12200.0)

特異クラス klass にその唯一のインスタンス obj を結びつけます。

特異クラス klass にその唯一のインスタンス obj を結びつけます。

NEWS for Ruby 2.1.0 (48.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...y
* 追加: Array#to_h キーと値のペアの配列をハッシュに変換します。

* Binding
* 追加: Binding#local_variable_get
* 追加: Binding#local_variable_set
* 追加: Binding#local_variable_defined?

* Enumerable
* 追加: Enumerable#to_h キーと値のペ...
...OTS
* RUBY_GC_HEAP_GROWTH_FACTOR
* RUBY_GC_HEAP_GROWTH_MAX_SLOTS
* RUBY_GC_MALLOC_LIMIT_MAX
* RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR
* RUBY_GC_OLDMALLOC_LIMIT
* RUBY_GC_OLDMALLOC_LIMIT_MAX
* RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR
* 廃止した環境変数...
...* Kernel
* 追加: Kernel#singleton_method(Object#singleton_method)

* Module
* 追加: Module#using, which activates refinements of the specified module only
in the current class or module definition.
* 追加: Module#singleton_class? レシーバーが特異クラスであ...

クラス/メソッドの定義 (28.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

...クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* d...
...い。Net を include できるなどのため)
module Net
class HTTP
end
class FTP
end
end

obj = Net::HTTP.new

# あるいは

include Net
o
bj = HTTP.new

# 以下のような使い方は組み込みのクラスにも見られる
# 利用者は File::Constants を include することで...
...は、最後に評価した式の結果を返します。最後に評価した式
が値を返さない場合は nil を返します。

===[a:singleton_class] 特異クラス定義

//emlist[例][ruby]{
obj = Object.new # obj = nil でも可
class << obj
def test
# ...
end
# ...
end
//}...

Ruby用語集 (12.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...の総称。

参照:d:spec/literal#percent

: 0 オリジン
: zero-based
番号が 0 から始まること。

例えば、
Array や Vector、Matrix などの要素の番号、
String における文字の位置、
といったものは 0 オリジンである。

: 1 オリジン
:...
...

https://www.ruby.or.jp/ja/

: Ruby ビジネス・コモンズ
https://www.facebook.com/rubybizcommons

===[a:S] S

: safe navigation operator
=安全参照演算子

: self
現在のコンテキストにおいて、暗黙のレシーバーとなるオブジェクト。

また、...
...

: 特異クラス
: singleton class
すべてのオブジェクトには自身が属すクラスとは別に、オブジェクト固有の
クラスがあり、特異クラスと呼ばれる。

参照:Object#singleton_class

: 特異メソッド
: singleton method
オブジェクト...
<< 1 2 > >>