るりまサーチ

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

別のキーワード

  1. win32ole ole_respond_to?
  2. object respond_to?
  3. _builtin respond_to?
  4. delegate respond_to?
  5. delegator respond_to?

ライブラリ

クラス

キーワード

検索結果

Object#respond_to?(name, include_all = false) -> bool (18136.0)

オブジェクトがメソッド name を持つとき真を返します。

...ど、C言語で実装されているメソッドのみです。
Rubyで実装されたメソッドで NotImplementedError が発生する場合は true を返します。

メソッドが定義されていない場合は、Object#respond_to_missing? を呼
び出してその結果を返します。...
...メソッド名です。

@param include_all private メソッドと protected メソッドを確認の対象に
含めるかを true か false で指定します。省略した場合
は false(含めない) を指定した事になります。

//emlist[][ruby]...
...def hello
"Guten Tag"
end
end
list = [F.new,D.new]

list.each{|it| puts it.hello if it.respond_to?(:hello)}
#=> Bonjour

list.each{|it| it.instance_eval("puts hello if it.respond_to?(:hello, true)")}
#=> Bonjour
# Guten Tag

module Template
def main
start
template_method
fin...

WIN32OLE#ole_respond_to?(name) -> bool (6106.0)

指定したメソッドをオブジェクトがサポートしているか調べます。

...ド名を文字列またはシンボルで指定します。

@return nameで指定したメソッドをオブジェクトが提供していれば真を返します。

excel = WIN32OLE.new('Excel.Application')
excel.ole_respond_to?(:quit) #=> true
excel.ole_respond_to?(:exit) #=> false...

NEWS for Ruby 2.0.0 (42.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ます
:close_others オプションのデフォルト値を true に変更しました
* 非互換: respond_to? は protected なメソッドに対して false を返します。第2引数に true を指定すると true を返します。
* 非互換: Kernel.#__callee__ はオリジ...
...ers option is true by default for system() and exec().
Also, the close-on-exec flag is set by default for all new file descriptors.
This means file descriptors doesn't inherit to spawned process unless
explicitly requested such as system(..., fd=>fd).

* Kernel#respond_to? against a pr...
...otected method now returns false
unless the second argument is true.

* Object#respond_to_missing?, Object#initialize_clone, Object#initialize_dup
* private になりました

* Thread#join, Thread#value
* 上を参照

* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize...

ruby 1.8.4 feature (36.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...#
# * win32.h, win32.c (rb_w32_osid): check the running platform.

i-nodeを持たないシステム(Windows等)でtest(?-, ...)が常にtrueを返し
ていたバグを修正。((<ruby-core:06672>))

: File.identical? [new]
: FileTest.identical? [new]

test(?-, ...) の代替メ...
...18 12:18:02 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
#
# * win32/win32.h (S_IFIFO): r,w = IO.pipe; r.stat.pipe? now
# returns true on VisualC++6.

VisualC++ 6 では S_IFIFO がなく _S_IFIFO しか定義されていないため、
パイプに対する stat.pipe? が...
...method with the given visibility. [ruby-dev:27408]
#
# * eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411]

rb_respond_to()をObject#respond_to?のデフォルトの動作と同じ(public
メソッドにしか反応しない)にした。((<ruby-dev:2741...