156件ヒット
[1-100件を表示]
(0.095秒)
ライブラリ
- ビルトイン (60)
-
irb
/ context (12) -
rdoc
/ code _ object (24) -
rdoc
/ context (36) -
rdoc
/ stats (24)
クラス
-
IRB
:: Context (12) - Module (48)
- Object (12)
-
RDoc
:: CodeObject (24) -
RDoc
:: Context (36) -
RDoc
:: Stats (24)
キーワード
- ancestors (12)
-
append
_ features (12) -
const
_ source _ location (12) -
document
_ children= (12) -
each
_ classmodule (12) - extend (12)
-
initialize
_ classes _ and _ modules (12) -
load
_ modules (12) -
num
_ modules (12) -
num
_ modules= (12) - prepend (12)
-
remove
_ classes _ and _ modules (12)
検索結果
先頭5件
-
RDoc
:: Context # modules -> [RDoc :: NormalModule] (18202.0) -
追加された RDoc::NormalModule の配列を返します。
...追加された RDoc::NormalModule の配列を返します。... -
IRB
:: Context # load _ modules -> [String] (12218.0) -
irb の起動時に -r オプション指定で読み込まれたライブラリ、~/.irbrc など の設定ファイル内で IRB.conf[:LOAD_MODULES] 指定で読み込まれたライブラリ の名前の配列を返します。
...irb の起動時に -r オプション指定で読み込まれたライブラリ、~/.irbrc など
の設定ファイル内で IRB.conf[:LOAD_MODULES] 指定で読み込まれたライブラリ
の名前の配列を返します。... -
RDoc
:: CodeObject # remove _ classes _ and _ modules -> () (12202.0) -
何もしません。RDoc::CodeObject#document_children= に false を指定 した時のコールバックとして呼び出されます。オーバーライドして使用します。
...何もしません。RDoc::CodeObject#document_children= に false を指定
した時のコールバックとして呼び出されます。オーバーライドして使用します。... -
RDoc
:: Context # initialize _ classes _ and _ modules -> () (12202.0) -
追加されたクラスやモジュールをクリアします。
追加されたクラスやモジュールをクリアします。 -
RDoc
:: Stats # num _ modules=(val) (9202.0) -
解析したモジュールの数を指定します。
...解析したモジュールの数を指定します。
@param val 数値を指定します。... -
RDoc
:: Stats # num _ modules -> Integer (9102.0) -
解析したモジュールの数を返します。
解析したモジュールの数を返します。 -
Module
# const _ source _ location(name , inherited = true) -> [String , Integer] (6161.0) -
name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。
...name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。
@param name Symbol,String で定数の名前を指定します。
@param inherited true を指定するとスーパークラスや include したモジュールで定義され......た定数が対象にはなります。false を指定した場合 対象にはなりません。
@return ソースコードのファイル名と行番号を配列で返します。
指定した定数が見つからない場合は nil を返します。
定数は見つかったがソ......list[例][ruby]{
# test.rb:
class A # line 1
C1 = 1
C2 = 2
end
module M # line 6
C3 = 3
end
class B < A # line 10
include M
C4 = 4
end
class A # 継続して A を定義する
C2 = 8 # 定数を再定義する
end
p B.const_source_location('C4') # => ["te... -
Module
# ancestors -> [Class , Module] (6113.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... -
Module
# append _ features(module _ or _ class) -> self (6113.0) -
モジュール(あるいはクラス)に self の機能を追加します。
...ます。
//emlist[例][ruby]{
def include(*modules)
modules.reverse_each do |mod|
# append_features や included はプライベートメソッドなので
# 直接 mod.append_features(self) などとは書けない
mod.__send__(:append_features, self)
mod.__send__(:included, sel...