るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

Delegator#respond_to?(m) -> bool (18201.0)

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

...Delegator#__getobj__ が返すオブジェクトが メソッド m を持つとき真を返します。

@param m メソッド名

@see Object#respond_to?...

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

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

...private
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...
...t implement template_method
end

puts ImplTemplateMethod.new.respond_to?(:template_method) # => true
# NotImplementedError が発生しているが、Rubyによる実装部のため true を返す
puts NotImplTemplateMethod.new.respond_to?(:template_method) # => true
# GNU/Linux で実行。C言語...

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

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

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

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

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

ruby 1.8.4 feature (24.0)

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

...列であることを期待し
てスクリプトを書いている場合には修正が必要になる場合があります.

例えば bool 値を返す属性については true または false を返すようになり
ます.よって,戻り値が "1", "0" の文字列,ある...
....本来,Tcl/Tk の真偽値は
他にも "true", "false", "yes", "no" などもありますので,値の真偽判定は
TkComm.bool (TkUtil.bool) メソッドを使って判定することを推奨します.

また,Tcl/Tk 上の変数が割り当てられている属性にお...
...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...