11件ヒット
[1-11件を表示]
(0.060秒)
別のキーワード
検索結果
-
Object
# respond _ to?(name , include _ all = false) -> bool (18306.0) -
オブジェクトがメソッド name を持つとき真を返します。
...の Process.fork や GNU/Linux での File.lchmod の
ような NotImplementedError が発生する場合は false を返します。
※ NotImplementedError が発生する場合に false を返すのは
Rubyの組み込みライブラリや標準ライブラリなど、C言語で実装されて......private メソッドと protected メソッドを確認の対象に
含めるかを true か false で指定します。省略した場合
は false(含めない) を指定した事になります。
//emlist[][ruby]{
class F
def hello
"Bonjour"
end
en......lo 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 NotImple...