るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.023秒)

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file ctime
  4. file chown
  5. file chmod

ライブラリ

検索結果

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

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

...いうのは、
オブジェクトが メソッド name に応答できることをいいます。

Windows での Process.fork や GNU/Linux での File.lchmod の
ような NotImplementedError が発生する場合は false を返します。

※ NotImplementedError が発生する場合に false...
...します。

メソッドが定義されていない場合は、Object#respond_to_missing? を呼
び出してその結果を返します。

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

@param include_all private メソッドと protected メソッドを確認の...
...mentedError.new
end

def finish
puts "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?...