るりまサーチ

最速Rubyリファレンスマニュアル検索!
132件ヒット [101-132件を表示] (0.069秒)

別のキーワード

  1. module protected
  2. _builtin protected
  3. object protected_methods
  4. _builtin protected_methods
  5. delegate protected_methods

検索結果

<< < 1 2 >>

Module#public_method_defined?(name, inherit=true) -> bool (14.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
include A
def method3()...

Module#private_method_defined?(name, inherit=true) -> bool (8.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#public_instance_method(name) -> UnboundMethod (8.0)

self の public インスタンスメソッド name をオブジェクト化した UnboundMethod を返します。

...名や、
protected
メソッド名、 private メソッド名を引数として与えると発生します。

//emlist[例][ruby]{
Kernel.public_instance_method(:object_id) #=> #<UnboundMethod: Kernel#object_id>
Kernel.public_instance_method(:p) # method `p' for module `Kernel' is...
...private (NameError)
//}

@see Module#instance_method,Object#public_method...
<< < 1 2 >>