別のキーワード
種類
- 文書 (4)
- インスタンスメソッド (3)
ライブラリ
- ビルトイン (3)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (1) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (1)
- Ruby用語集 (1)
-
private
_ class _ method (1) -
singleton
_ class? (1) - クラス/メソッドの定義 (1)
検索結果
先頭5件
-
Object
# singleton _ class -> Class (54658.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 (18658.0) -
self が特異クラスの場合に true を返します。そうでなければ false を返し ます。
self が特異クラスの場合に true を返します。そうでなければ false を返し
ます。
//emlist[例][ruby]{
class C
end
C.singleton_class? # => false
C.singleton_class.singleton_class? # => true
//} -
Ruby用語集 (397.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
... -
Module
# private _ class _ method(*name) -> self (337.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... -
クラス/メソッドの定義 (337.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
* defined
===[a:class] クラス定義
//emlist[例][ruby]{
class Foo < S... -
NEWS for Ruby 2
. 1 . 0 (235.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
NEWS for Ruby 2.1.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.0.0 以降の変更
=== 言語仕様の変更
* キーワード引数のデフォルト値が省略可能になりました。これらの「必須キーワード引数」は呼び出し時に明示的に与えなければなりません。
* 整数や小数のリテラルの末尾に'r','i','... -
Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (235.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
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:ex] !
: !true
not 演算子。d:spec/operator#notを参照。
: 3 != 5
「等しくない」比較演算子。d:spec/operator#notを参...