66件ヒット
[1-66件を表示]
(0.213秒)
トップページ > :respond_to?
種類
- インスタンスメソッド (33)
- 文書 (22)
- ライブラリ (11)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
irb
/ completion (11) -
ole
_ respond _ to? (11) -
ruby 1
. 8 . 4 feature (11)
検索結果
先頭5件
-
Delegator
# respond _ to?(m) -> bool (18100.0) -
Delegator#__getobj__ が返すオブジェクトが メソッド m を持つとき真を返します。
...Delegator#__getobj__ が返すオブジェクトが メソッド m を持つとき真を返します。
@param m メソッド名
@see Object#respond_to?... -
Object
# respond _ to?(name , include _ all = false) -> bool (18100.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 (6100.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 (12.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ルディスクリプタを閉じます
:close_others オプションのデフォルト値を true に変更しました
* 非互換: respond_to? は protected なメソッドに対して false を返します。第2引数に true を指定すると true を返します。
* 非互換:......ors.
This means file descriptors doesn't inherit to spawned process unless
explicitly requested such as system(..., fd=>fd).
* Kernel#respond_to? against a protected method now returns false
unless the second argument is true.
* Object#respond_to_missing?, Object#initialize_clone,... -
irb
/ completion (6.0) -
irb の completion 機能を提供するライブラリです。
...foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect foo.send
foo.__send__ foo.instance_eval foo.singleton_methods
foo.class... -
ruby 1
. 8 . 4 feature (6.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...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...