11件ヒット
[1-11件を表示]
(0.500秒)
検索結果
先頭2件
-
Module
# protected _ method _ defined?(name , inherit=true) -> bool (30430.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。
...ame がモジュールに定義されており、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include......@see Module#method_defined?, Module#public_method_defined?, Module#private_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.......protected_method_defined? "method1" #=> false
C.protected_method_defined? "method2" #=> true
C.protected_method_defined? "method2", true #=> true
C.protected_method_defined? "method2", false #=> false
C.method_defined? "method2" #=> true
//}... -
Module
# protected _ method _ defined?(name) -> bool (30318.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。
...e がモジュールに定義されており、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@see Module#method_defined?, Module#public_method_defined?, Module#pri......vate_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.protected_method_defined? "method1" #=> false
C.protected_metho......d_defined? "method2" #=> true
C.method_defined? "method2" #=> true
//}...