504件ヒット
[501-504件を表示]
(0.085秒)
キーワード
-
alias
_ method (12) - attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - autoload (12)
- autoload? (12)
-
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) -
deprecate
_ constant (12) - inspect (12)
-
method
_ defined? (12) -
module
_ function (24) - name (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) - protected (48)
-
protected
_ method _ defined? (12) - public (36)
-
public
_ method _ defined? (12) -
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ method (12) -
to
_ s (12)
検索結果
-
Module
# public _ method _ defined?(name , inherit=true) -> bool (110.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が public であるときに true を返します。 そうでなければ false を返します。
...に true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#met......hod_defined?, Module#private_method_defined?, Module#protected_method_defined?
//emlist[例][ruby]{
module A
def method1() end
end
class B
protected
def method2() end
end
class C < B
include A
def method3() end
end
A.method_defined? :method1 #=> true
C.public_method_de......fined? "method1" #=> true
C.public_method_defined? "method1", true #=> true
C.public_method_defined? "method1", false #=> true
C.public_method_defined? "method2" #=> false
C.method_defined? "method2" #=> true
//}...