種類
- インスタンスメソッド (9)
- 文書 (2)
- 特異メソッド (2)
- 関数 (2)
ライブラリ
- ビルトイン (6)
- delegate (1)
- e2mmap (1)
-
rdoc
/ context (2) -
rdoc
/ top _ level (1)
クラス
- Class (3)
- Method (1)
- Module (1)
- Object (1)
-
RDoc
:: Context (2) -
RDoc
:: TopLevel (1)
モジュール
- Exception2MessageMapper (1)
- Kernel (1)
キーワード
- DelegateClass (1)
- Ruby用語集 (1)
-
add
_ class (1) -
add
_ class _ or _ module (2) - ancestors (1)
- class (1)
-
def
_ exception (1) - new (2)
-
rb
_ class _ superclass (1) -
ruby 1
. 8 . 2 feature (1) -
super
_ method (1)
検索結果
先頭5件
- static VALUE superclass(VALUE self
, NODE *node) - Class
# superclass -> Class | nil - static VALUE rb
_ class _ superclass(VALUE klass) - RDoc
:: TopLevel # add _ class _ or _ module(collection , class _ type , name , superclass) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule - RDoc
:: Context # add _ class(class _ type , name , superclass) -> RDoc :: SingleClass | RDoc :: NormalClass
-
static VALUE superclass(VALUE self
, NODE *node) (132901.0) -
クラス文のスーパークラスを表すノード node を 評価してクラスを得ます。
クラス文のスーパークラスを表すノード node を
評価してクラスを得ます。 -
Class
# superclass -> Class | nil (82012.0) -
自身のスーパークラスを返します。
自身のスーパークラスを返します。
//emlist[例][ruby]{
File.superclass #=> IO
IO.superclass #=> Object
class Foo; end
class Bar < Foo; end
Bar.superclass #=> Foo
Object.superclass #=> BasicObject
//}
ただし BasicObject.superclass は nil を返します。
//emlist[例][ruby]{
BasicObject.supercl... -
static VALUE rb
_ class _ superclass(VALUE klass) (54901.0) -
-
RDoc
:: TopLevel # add _ class _ or _ module(collection , class _ type , name , superclass) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule (28822.0) -
collection に name で指定したクラス、モジュールを追加します。
collection に name で指定したクラス、モジュールを追加します。
@param collection クラス、モジュールを追加する先を Hash オブジェ
クトで指定します。
@param class_type 追加するクラス、モジュールを RDoc::NormalClass、
RDoc::SingleClass、RDoc::NormalModule オ
ブジェクトのいずれかで指定します。
@param name クラス名を文字列で指定します。
@param su... -
RDoc
:: Context # add _ class(class _ type , name , superclass) -> RDoc :: SingleClass | RDoc :: NormalClass (19822.0) -
引数で指定したクラスを追加します。
引数で指定したクラスを追加します。
@param class_type 追加するクラス、モジュールを RDoc::NormalClass、
RDoc::SingleClass、RDoc::NormalModule オ
ブジェクトのいずれかで指定します。
@param name クラス名を文字列で指定します。
@param superclass 追加するクラスの親クラスを RDoc::NormalClass オ
ブジェクトで指定します。 -
RDoc
:: Context # add _ class _ or _ module(collection , class _ type , name , superclass = nil) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule (19822.0) -
collection に name で指定したクラス、モジュールを追加します。
collection に name で指定したクラス、モジュールを追加します。
@param collection クラス、モジュールを追加する先を Hash オブジェ
クトで指定します。
@param class_type 追加するクラス、モジュールを RDoc::NormalClass、
RDoc::SingleClass、RDoc::NormalModule オ
ブジェクトのいずれかで指定します。
@param name クラス名を文字列で指定します。
@param su... -
Kernel
# DelegateClass(superclass) -> object (18670.0) -
クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。
クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、
そのクラスを返します。
@param superclass 委譲先となるクラス
例:
//emlist{
require 'delegate'
class ExtArray < DelegateClass(Array)
def initialize
super([])
end
end
a = ExtArray.new
p a.class # => ExtArray
a.push 25
p a # => [25]
//} -
Object
# class -> Class (18619.0) -
レシーバのクラスを返します。
レシーバのクラスを返します。
//emlist[][ruby]{
p "ruby".class #=> String
p 100.class #=> Integer
p ARGV.class #=> Array
p self.class #=> Object
p Class.class #=> Class
p Kernel.class #=> Module
//}
@see Class#superclass,Object#kind_of?,Object#instance_of? -
Class
. new(superclass = Object) {|klass| . . . } -> Class (10291.0) -
新しく名前の付いていない superclass のサブクラスを生成します。
新しく名前の付いていない superclass のサブクラスを生成します。
名前のないクラスは、最初に名前を求める際に代入されている定数名を検
索し、見つかった定数名をクラス名とします。
//emlist[例][ruby]{
p foo = Class.new # => #<Class:0x401b90f8>
p foo.name # => nil
Foo = foo # ここで p foo すれば "Foo" 固定
Bar = foo
p foo.name # => "Bar" ("Foo" になるか "Bar" になるかは... -
Class
. new(superclass = Object) -> Class (9991.0) -
新しく名前の付いていない superclass のサブクラスを生成します。
新しく名前の付いていない superclass のサブクラスを生成します。
名前のないクラスは、最初に名前を求める際に代入されている定数名を検
索し、見つかった定数名をクラス名とします。
//emlist[例][ruby]{
p foo = Class.new # => #<Class:0x401b90f8>
p foo.name # => nil
Foo = foo # ここで p foo すれば "Foo" 固定
Bar = foo
p foo.name # => "Bar" ("Foo" になるか "Bar" になるかは... -
Module
# ancestors -> [Class , Module] (9319.0) -
クラス、モジュールのスーパークラスとインクルードしているモジュール を優先順位順に配列に格納して返します。
クラス、モジュールのスーパークラスとインクルードしているモジュール
を優先順位順に配列に格納して返します。
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
p ancestors
p included_modules
p superclass
end
# => [Baz, Bar, Foo, Object, Kernel, BasicObject]
# => [Foo, Kernel]
# => Bar
//}
@see Module#included_modules
... -
Ruby用語集 (9055.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
... -
Exception2MessageMapper
# def _ exception(exception _ name , message _ format , superclass = StandardError) -> Class (922.0) -
exception_name という名前の例外クラスを定義します。
exception_name という名前の例外クラスを定義します。
@param exception_name 定義する例外クラスの名前をシンボルで指定します。
@param message_format メッセージのフォーマット。
@param superclass 定義する例外のスーパークラスを指定します。
省略すると StandardError を使用します。 -
Method
# super _ method -> Method | nil (337.0) -
self 内で super を実行した際に実行されるメソッドを Method オブジェ クトにして返します。
self 内で super を実行した際に実行されるメソッドを Method オブジェ
クトにして返します。
@see UnboundMethod#super_method
//emlist[例][ruby]{
class Super
def foo
"superclass method"
end
end
class Sub < Super
def foo
"subclass method"
end
end
m = Sub.new.method(:foo) # => #<Method: Sub#foo>
m.call # => "subclass me... -
ruby 1
. 8 . 2 feature (73.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
ruby 1.8.2 feature
ruby 1.8.2 での ruby 1.8.1 からの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。
以下は各変更点に付けるべきタグです。
*カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
*レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/...