9件ヒット
[1-9件を表示]
(0.140秒)
別のキーワード
ライブラリ
- ビルトイン (4)
- delegate (1)
- e2mmap (1)
-
rdoc
/ context (2) -
rdoc
/ top _ level (1)
クラス
- Class (1)
- Method (1)
- Module (1)
- Object (1)
-
RDoc
:: Context (2) -
RDoc
:: TopLevel (1)
モジュール
- Exception2MessageMapper (1)
- Kernel (1)
キーワード
- DelegateClass (1)
-
add
_ class (1) -
add
_ class _ or _ module (2) - ancestors (1)
- class (1)
-
def
_ exception (1) -
super
_ method (1)
検索結果
先頭5件
- Class
# superclass -> Class | nil - Exception2MessageMapper
# def _ exception(exception _ name , message _ format , superclass = StandardError) -> Class - Method
# super _ method -> Method | nil - 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
-
Class
# superclass -> Class | nil (72715.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... -
Exception2MessageMapper
# def _ exception(exception _ name , message _ format , superclass = StandardError) -> Class (27925.0) -
exception_name という名前の例外クラスを定義します。
exception_name という名前の例外クラスを定義します。
@param exception_name 定義する例外クラスの名前をシンボルで指定します。
@param message_format メッセージのフォーマット。
@param superclass 定義する例外のスーパークラスを指定します。
省略すると StandardError を使用します。 -
Method
# super _ method -> Method | nil (18340.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... -
RDoc
:: TopLevel # add _ class _ or _ module(collection , class _ type , name , superclass) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule (9925.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 (925.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 (925.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 (709.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 (130.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? -
Module
# ancestors -> [Class , Module] (76.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
...