るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.047秒)
トップページ > クエリ:include[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 (18219.0)

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

...o_missing? を呼
び出してその結果を返します。

@param name Symbol または文字列で指定するメソッド名です。

@param include_all private メソッドと protected メソッドを確認の対象に
含めるかを true か false で指定します。...
...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...
..."finish"
end
end

class ImplTemplateMethod
include
Template
def template_method
"implement template_method"
end
end

class NotImplTemplateMethod
include
Template

# not implement template_method
end

puts ImplTemplateMethod.new.respond_to?(:template_method) # => true
# NotImplemente...

irb/completion (12.0)

irb の completion 機能を提供するライブラリです。

...ます. 候補が唯一ならば完全に補完します.

irb(main):001:0> in
in inspect instance_eval
include
install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"m...
...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 (12.0)

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

...ました。((<ruby-dev:27964>))

module Foo
def initialize
super
end
end

class Bar
include
Foo
def initialize
Foo.instance_method(:initialize).bind(self).call
end
end

Bar.new...
...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...