るりまサーチ

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

別のキーワード

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

検索結果

NEWS for Ruby 2.1.0 (26024.0)

NEWS for Ruby 2.1.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 を返します。
レシーバーが通常のクラスやモジュールであれ...
...ectSpace.#reachable_objects_from_root
* 追加: ObjectSpace.#dump
* 追加: ObjectSpace.#dump_all

* OpenSSL::BN
* 拡張: OpenSSL::BN.new Fixnum や Bignum を引数として取れるようになりました。

* open-uri
* 複数フィールドに同じ名前を使うことを...

Object#singleton_class -> Class (18125.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...

VALUE rb_singleton_class_new(VALUE super) (12200.0)

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

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

クラス/メソッドの定義 (112.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
obj = HTTP.new

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

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

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

文法:

class `<<' exp...

Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (18.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

...ラスのインスタンスメソッドであることを
簡単に表示するための表記法です。一方、クラスメソッドは「Range.new」のように「.」でつなぎます。

===[a:per] %

: 10 % 3

各クラスで定義された「%」演算子。整数クラスでは「剰...
...法。以下と同じです。
//emlist{
{ :a => "aaa", :b => "bbb" }
//}

===[a:period] .

: xxx.yyy

オブジェクトのメソッド

: Range.new

オブジェクトのメソッドだが、説明文の中では特にクラスのクラスメソッド/モジュールの
モジュールメソ...
...クラス定義でスーパークラスを指定しています。
d:spec/def#class。

: class << obj

特異クラス定義。d:spec/def#singleton_classを参照。

===[a:rangl] >

: 3 > 5

「より大きい」比較演算子

: 3 >= 5

「より大きいか等しい」比較演算子

: 3...

絞り込み条件を変える

Ruby用語集 (12.0)

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

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

参照:Object#singleton_class

: 特異メソッド
: singleton method
オブジェクト固有のメソッド。
オブジェクトの特異クラスのインスタ...
...文字としては特別扱いされない。
ただしパス名には使えず、ヌル文字を含んだ文字列を File.open や
Pathname.new に与えると ArgumentError が発生する。

他の言語では文字列の終端を意味することがあるので、文字列データ...