るりまサーチ

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

検索結果

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

クラス/メソッドの定義 (178.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...
...erclass ]
式..
end

文法:

class 識別子 [`<' superclass ]
式..
[rescue [error_type,..] [=> evar] [then]
式..]..
[else
式..]
[ensure
式..]
end

クラスを定義します...
...スがない。Net を include できるなどのため)
module Net
class HTTP
end
class FTP
end
end

obj = Net::HTTP.new

# あるいは

include Net
obj = HTTP.new

# 以下のような使い方は組み込みのクラスにも見られる
# 利用者は File::Constants を include する...

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

...繰り返し。

===[a:num] #

: #コメント
d:spec/lexical#comment。# から行末までがコメントになります。

: xxx #=> 実行結果
: xxx # => 実行結果

慣用的に実行結果を示すために使われるコメントの書き方。

: #! ruby -Ks

shebang。d:spec/rubycmd...
...a is #{a}" #=> "a is 10"
//}

: Range#each

説明文の中でのみ使われます。Ruby言語の要素ではありません。クラスのインスタンスメソッドであることを
簡単に表示するための表記法です。一方、クラスメソッドは「Range.new」のよう...
...。d:spec/variables#const を参照。

: ::DateTime

定数のスコープ演算子で、トップレベルの定数であることを示す。Object クラスで
定義されている定数(トップレベルの定数と言う)を確実に参照するためには
d:spec/variables#const を参...