11件ヒット
[1-11件を表示]
(0.047秒)
別のキーワード
クラス
- Object (11)
検索結果
-
Object
# respond _ to?(name , include _ all = false) -> bool (18285.0) -
オブジェクトがメソッド name を持つとき真を返します。
...オブジェクトがメソッド name を持つとき真を返します。
オブジェクトが メソッド name を持つというのは、
オブジェクトが メソッド name に応答できることをいいます。
Windows での Process.fork や GNU/Linux での File.lchmod の
よ......ます。
メソッドが定義されていない場合は、Object#respond_to_missing? を呼
び出してその結果を返します。
@param name Symbol または文字列で指定するメソッド名です。
@param include_all private メソッドと protected メソッドを確認の対......t.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
def start
puts "start"
end
def template_method
raise Not...