るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

クラス

検索結果

File.lchmod(mode, *filename) -> Integer (29215.0)

File.chmod と同様ですが、シンボリックリンクに関してリンクそのものの モードを変更します。

...File.chmod と同様ですが、シンボリックリンクに関してリンクそのものの
モードを変更します。

@param filename ファイル名を表す文字列を指定します。

@param mode chmod(2) と同様に整数で指定します。

@raise NotImplementedError lchmod(2)...
...します。

@raise Errno::EXXX モードの変更に失敗した場合に発生します。

//emlist[例][ruby]{
I
O.write("testfile", "test")
File.symlink("testfile", "testlink")
File.lstat("testlink").ftype # => "link"
File.lchmod(0744, "testlink")
File.stat("testlink").mode.to_s(8)...
...# => "100644"
File.lstat("testlink").mode.to_s(8) # => "120744"
//}...

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

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

...クトが メソッド name に応答できることをいいます。

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

※ NotImplementedError が発生する場合に false を返すのは
Rubyの組...
...otImplementedError が発生する場合は true を返します。

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

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

@param include_all priva...
...なります。

//emlist[][ruby]{
class F
def hello
"Bonjour"
end
end

class D
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, tru...