156件ヒット
[101-156件を表示]
(0.113秒)
ライブラリ
- ビルトイン (156)
キーワード
- < (12)
- <= (12)
- === (12)
- > (12)
- >= (12)
-
class
_ variable _ defined? (12) -
const
_ defined? (12) - include? (12)
-
method
_ defined? (12) -
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
public
_ method _ defined? (12) -
singleton
_ class? (12)
検索結果
先頭5件
-
Module
# method _ defined?(name , inherit=true) -> bool (103.0) -
モジュールにインスタンスメソッド name が定義されており、 かつその可視性が public または protected であるときに true を返します。
...モジュールで
定義されたメソッドも対象になります。
@see Module#public_method_defined?, Module#private_method_defined?, Module#protected_method_defined?
//emlist[例][ruby]{
module A
def method1() end
def protected_method1() end
protected :protected_method1
end... -
Module
# private _ method _ defined?(name , inherit=true) -> bool (103.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が private であるときに true を返します。 そうでなければ false を返します。
...したモジュールで
定義されたメソッドも対象になります。
@see Module#method_defined?, Module#public_method_defined?, Module#protected_method_defined?
//emlist[例][ruby]{
module A
def method1() end
end
class B
private
def method2() end
end
class C < B
includ... -
Module
# protected _ method _ defined?(name , inherit=true) -> bool (103.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。
...したモジュールで
定義されたメソッドも対象になります。
@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
inclu... -
Module
# public _ method _ defined?(name , inherit=true) -> bool (103.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が public であるときに true を返します。 そうでなければ false を返します。
...たモジュールで
定義されたメソッドも対象になります。
@see Module#method_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
includ... -
Module
# singleton _ class? -> bool (103.0) -
self が特異クラスの場合に true を返します。そうでなければ false を返し ます。
self が特異クラスの場合に true を返します。そうでなければ false を返し
ます。
//emlist[例][ruby]{
class C
end
C.singleton_class? # => false
C.singleton_class.singleton_class? # => true
//}