ライブラリ
- ビルトイン (11)
- mkmf (2)
-
rake
/ packagetask (1) -
win32
/ registry (2) - win32ole (1)
クラス
- Module (8)
- Object (1)
- Proc (1)
-
Rake
:: PackageTask (1) - TracePoint (1)
-
WIN32OLE
_ TYPE (1) -
Win32
:: Registry :: PredefinedKey (2)
モジュール
- Kernel (2)
キーワード
- class (1)
-
class
_ exec (1) - close (1)
-
const
_ defined? (1) -
convertible
_ int (2) -
default
_ event _ sources (1) -
define
_ method (2) -
defined
_ class (1) -
instance
_ variable _ defined? (1) - lambda? (1)
-
module
_ exec (1) -
private
_ method _ defined? (1) -
protected
_ method _ defined? (1) -
public
_ method _ defined? (1)
検索結果
先頭5件
-
Rake
:: PackageTask # define -> self (63607.0) -
タスクを定義します。
タスクを定義します。
@raise RuntimeError バージョン情報をセットしていない場合に発生します。
初期化時に :noversion が指定されている場合は発生しません。 -
Module
# public _ method _ defined?(name , inherit=true) -> bool (54904.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が public であるときに true を返します。 そうでなければ false を返します。
インスタンスメソッド name がモジュールに定義されており、
しかもその可視性が public であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#method_defined?, Module#private_method_defined?, Module#protected_method_defined?
//e... -
TracePoint
# defined _ class -> Class | module (45958.0) -
メソッドを定義したクラスかモジュールを返します。
メソッドを定義したクラスかモジュールを返します。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]{
module M; def foo; end; end
class C; include M; end;
trac... -
Module
# private _ method _ defined?(name , inherit=true) -> bool (45904.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が private であるときに true を返します。 そうでなければ false を返します。
インスタンスメソッド name がモジュールに定義されており、
しかもその可視性が private であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#method_defined?, Module#public_method_defined?, Module#protected_method_defined?
//e... -
Module
# protected _ method _ defined?(name , inherit=true) -> bool (45904.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。
インスタンスメソッド name がモジュールに定義されており、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#method_defined?, Module#public_method_defined?, Module#private_method_defined?
//e... -
Object
# instance _ variable _ defined?(var) -> bool (36730.0) -
インスタンス変数 var が定義されていたら真を返します。
インスタンス変数 var が定義されていたら真を返します。
@param var インスタンス変数名を文字列か Symbol で指定します。
//emlist[][ruby]{
class Fred
def initialize(p1, p2)
@a, @b = p1, p2
end
end
fred = Fred.new('cat', 99)
p fred.instance_variable_defined?(:@a) #=> true
p fred.instance_variable_defined?("@b") #=> true
p fred.instan... -
Win32
:: Registry :: PredefinedKey # class (36304.0) -
@todo
@todo -
Win32
:: Registry :: PredefinedKey # close (36304.0) -
@todo
@todo -
Module
# const _ defined?(name , inherit = true) -> bool (27676.0) -
モジュールに name で指定される名前の定数が定義されている時真 を返します。
モジュールに name で指定される名前の定数が定義されている時真
を返します。
スーパークラスや include したモジュールで定義された定数を検索対象
にするかどうかは第二引数で制御することができます。
@param name String, Symbol で指定される定数名。
@param inherit false を指定するとスーパークラスや include したモジュールで
定義された定数は対象にはなりません。
//emlist[例][ruby]{
module Kernel
FOO = 1
end
# Object は include したモジュ... -
Module
# define _ method(name) { . . . } -> Symbol (27646.0) -
インスタンスメソッド name を定義します。
インスタンスメソッド name を定義します。
ブロックを与えた場合、定義したメソッドの実行時にブロックが
レシーバクラスのインスタンスの上で BasicObject#instance_eval されます。
@param name メソッド名を String または Symbol を指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
@raise TypeError method に同じクラス、サブクラス、モジュー... -
Module
# define _ method(name , method) -> Symbol (27646.0) -
インスタンスメソッド name を定義します。
インスタンスメソッド name を定義します。
ブロックを与えた場合、定義したメソッドの実行時にブロックが
レシーバクラスのインスタンスの上で BasicObject#instance_eval されます。
@param name メソッド名を String または Symbol を指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
@raise TypeError method に同じクラス、サブクラス、モジュー... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (27640.0) -
型が持つソースインターフェイスを取得します。
型が持つソースインターフェイスを取得します。
default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。
@return デフォルトのソースインターフェイスをWIN32OLE_TYPEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は空配列を返します。
tobj = ... -
Proc
# lambda? -> bool (27358.0) -
手続きオブジェクトの引数の取扱が厳密であるならば true を返します。
手続きオブジェクトの引数の取扱が厳密であるならば true を返します。
引数の取扱の厳密さの意味は以下の例を参考にしてください。
//emlist[例][ruby]{
# lambda で生成した Proc オブジェクトでは true
lambda{}.lambda? # => true
# proc で生成した Proc オブジェクトでは false
proc{}.lambda? # => false
# Proc.new で生成した Proc オブジェクトでは false
Proc.new{}.lambda? # => false
# 以下、lambda?が偽である場合
#... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (18796.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (18796.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Module
# class _ exec(*args) {|*vars| . . . } -> object (18358.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの定義式の中にあるかのように実行されます。
ローカル変数、定数とクラス変数のスコープはブロックの外側のスコープになります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
... -
Module
# module _ exec(*args) {|*vars| . . . } -> object (18358.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの定義式の中にあるかのように実行されます。
ローカル変数、定数とクラス変数のスコープはブロックの外側のスコープになります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
...