るりまサーチ

最速Rubyリファレンスマニュアル検索!
99件ヒット [1-99件を表示] (0.137秒)
トップページ > クエリ:i[x] > クエリ:h[x] > クエリ:public_method[x]

別のキーワード

  1. _builtin to_h
  2. struct to_h
  3. hash to_h
  4. ostruct to_h
  5. env to_h

検索結果

Object#public_method(name) -> Method (30413.0)

オブジェクトの public メソッド name をオブジェクト化した Method オブジェクトを返します。

...トの public メソッド name をオブジェクト化した
Method オブジェクトを返します。

@param name メソッド名を Symbol または String で指定します。
@raise NameError 定義されていないメソッド名や、
protected メソッド名、 private メソ...
...ッド名を引数として与えると発生します。

//emlist[][ruby]{
1.public_method(:to_int) #=> #<Method: Integer#to_int>
1.public_method(:p) # method `p' for class `Integer' is private (NameError)
//}

@see Object#method,Object#public_send,Module#public_instance_method...

static VALUE rb_mod_public_method(int argc, VALUE *argv, VALUE obj) (18400.0)

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

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

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

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義...
...ethod_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
i
nclude A
def method3() end
end

A.method_defined? :method1 #=> true
C.public_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_method_defined?(name) -> bool (18313.0)

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

...が public であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。

@see Module#method_defined?, Module#private_method_defined?, Module#protected_method_defined?

//emlist[例][ruby]{
module A
def method1() end...
...ass B
protected
def method2() end
end
class C < B
i
nclude A
def method3() end
end

A.method_defined? :method1 #=> true
C.public_method_defined? "method1" #=> true
C.public_method_defined? "method2" #=> false
C.method_defined? "method2" #=> tru...

Delegator#public_methods(all = true) -> [Symbol] (18300.0)

そのオブジェクトが理解できる public メソッド名の一覧を返します。

...そのオブジェクトが理解できる public メソッド名の一覧を返します。

@param all 偽を指定すると __getobj__ のスーパークラスで定義されたメソッドを除きます。

@see Object#public_methods...

絞り込み条件を変える

Object#public_methods(include_inherited = true) -> [Symbol] (18300.0)

そのオブジェクトが理解できる public メソッド名の一覧を返します。

...が理解できる public メソッド名の一覧を返します。

@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。


@see Module#public_instance_methods,Object#methods,Object#singleton_methods...

Module#method_defined?(name, inherit=true) -> bool (12306.0)

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

...lic または protected であるときに
true を返します。

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。

@see Module#public_meth...
...defined?, Module#private_method_defined?, Module#protected_method_defined?

//emlist[例][ruby]{
module A
def method1() end
def protected_method1() end
protected :protected_method1
end
class B
def method2() end
def private_method2() end
private :private_method2
end
class C < B
i
ncl...
...def method3() end
end

A.method_defined? :method1 #=> true
C.method_defined? "method1" #=> true
C.method_defined? "method2" #=> true
C.method_defined? "method2", true #=> true
C.method_defined? "method2", false #=> false
C.method_defined? "method3"...

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

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

...ol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。

@see Module#method_defined?, Module#public_method_defined?, Module#private_method_defined?

//emlist[例][r...
...hod1() end
end
class B
protected
def method2() end
end
class C < B
i
nclude 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_defi...
...ned? "method2", true #=> true
C.protected_method_defined? "method2", false #=> false
C.method_defined? "method2" #=> true
//}...

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

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

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

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

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

Module#method_defined?(name) -> bool (12206.0)

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

...public または protected であるときに
true を返します。

@param name Symbol か String を指定します。

@see Module#public_method_defined?, Module#private_method_defined?, Module#protected_method_defined?

//emlist[例][ruby]{
module A
def method1() end
def protected_method1...
...d :protected_method1
end
class B
def method2() end
def private_method2() end
private :private_method2
end
class C < B
i
nclude A
def method3() end
end

A.method_defined? :method1 #=> true
C.method_defined? "method1" #=> true
C.method_defined? "method2"...
...#=> true
C.method_defined? "method3" #=> true
C.method_defined? "protected_method1" #=> true
C.method_defined? "method4" #=> false
C.method_defined? "private_method2" #=> false
//}...

絞り込み条件を変える

Module#private_method_defined?(name) -> bool (12206.0)

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

...が private であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。

@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
i
nclude A
def method3() end
end

A.method_defined? :method1 #=> true
C.private_method_defined? "method1" #=> false
C.private_method_defined? "method2" #=> true
C.method_defined? "method2"...

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

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

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

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義...
...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
i
nclude A
def method3() end
end

A.method_defined? :method1 #=> true
C.private_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) -> bool (12206.0)

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

...String を指定します。

@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
i
nclude A
def method3() end
end

A.method_defined? :method1...
...#=> true
C.protected_method_defined? "method1" #=> false
C.protected_method_defined? "method2" #=> true
C.method_defined? "method2" #=> true
//}...