るりまサーチ

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

別のキーワード

  1. openssl public_key
  2. openssl public_key=
  3. _builtin public
  4. module public
  5. object public_send

検索結果

Module#public_method_defined?(name, inherit=true) -> bool (12227.0)

インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が public であるときに true を返します。 そうでなければ false を返します。

...がモジュールに定義されており、
しかもその可視性が public であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include した...
...ee Module#method_defined?, Module#private_method_defined?, Module#protected_method_defined?

//emlist[例][ruby]{
module
A
def method1() end
end
class B
p
rotected
def method2() end
end
class C < B
include A
def method3() end
end

A.method_defined? :method1 #=> true
C.pub...
...lic_method_defined? "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
//}...

Module#public_instance_method(name) -> UnboundMethod (6120.0)

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

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

@param name メソッド名を Symbol または String で指定します。

@raise NameError 定義されていないメソッド名や、
p
rotected メソッド名、 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...

Module#private_method_defined?(name, inherit=true) -> bool (6108.0)

インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が private であるときに true を返します。 そうでなければ false を返します。

...がモジュールに定義されており、
しかもその可視性が private であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include した...
...see Module#method_defined?, Module#public_method_defined?, Module#protected_method_defined?

//emlist[例][ruby]{
module
A
def method1() end
end
class B
p
rivate
def method2() end
end
class C < B
include A
def method3() end
end

A.method_defined? :method1 #=> true
C.pri...
...vate_method_defined? "method1" #=> false
C.private_method_defined? "method2" #=> true
C.private_method_defined? "method2", true #=> true
C.private_method_defined? "method2", false #=> false
C.method_defined? "method2" #=> false
//}...

Module#protected_method_defined?(name, inherit=true) -> bool (6108.0)

インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。

...モジュールに定義されており、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include した...
...ee Module#method_defined?, Module#public_method_defined?, Module#private_method_defined?

//emlist[例][ruby]{
module
A
def method1() end
end
class B
p
rotected
def method2() end
end
class C < B
include A
def method3() end
end

A.method_defined? :method1 #=> true
C.pro...
...tected_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
//}...