ライブラリ
- ビルトイン (187)
キーワード
-
caller
_ locations (22) - exec (44)
-
require
_ relative (11) - spawn (44)
- system (44)
-
world
_ readable? (11) -
world
_ writable? (11)
検索結果
先頭5件
- FileTest
. # world _ readable?(path) -> Integer | nil - FileTest
. # world _ writable?(path) -> bool - Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil - Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil - Kernel
. # exec(env , program , *args , options={}) -> ()
-
FileTest
. # world _ readable?(path) -> Integer | nil (8124.0) -
path が全てのユーザから読めるならばそのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。
...
path が全てのユーザから読めるならばそのファイルのパーミッションを表す
整数を返します。そうでない場合は nil を返します。
整数の意味はプラットフォームに依存します。
@param path パスを表す文字列を指定します。... -
FileTest
. # world _ writable?(path) -> bool (8124.0) -
path が全てのユーザから書き込めるならば、そのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。
...
path が全てのユーザから書き込めるならば、そのファイルのパーミッションを表す
整数を返します。そうでない場合は nil を返します。
整数の意味はプラットフォームに依存します。
@param path パスを表す文字列を指定し... -
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (8007.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...st[例][ruby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, n... -
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (8007.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...st[例][ruby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, n... -
Kernel
. # exec(env , program , *args , options={}) -> () (8007.0) -
引数で指定されたコマンドを実行します。
...り、第2要素が「みせかけ」のプロ
グラム名になります。
また、第1要素はフルパスで指定しなくても環境変数 PATH から探します。
@param program 文字列か2要素の配列を指定します。
@param args 渡される引数です。0 個以上の文... -
Kernel
. # exec(program , *args , options={}) -> () (8007.0) -
引数で指定されたコマンドを実行します。
...り、第2要素が「みせかけ」のプロ
グラム名になります。
また、第1要素はフルパスで指定しなくても環境変数 PATH から探します。
@param program 文字列か2要素の配列を指定します。
@param args 渡される引数です。0 個以上の文... -
Kernel
. # require _ relative(relative _ feature) -> bool (8007.0) -
現在のファイルからの相対パスで require します。
...現在のファイルからの相対パスで require します。
require File.expand_path(relative_feature, File.dirname(__FILE__))
とほぼ同じです。
Kernel.#eval などで文字列を評価した場合に、そこから
require_relative を呼出すと必ず失敗します。
@param r... -
Kernel
. # spawn(env , program , *args , options={}) -> Integer (8007.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...り、第2要素が「みせかけ」のプロ
グラム名になります。
また、第1要素はフルパスで指定しなくても環境変数 PATH から探します。
=== option引数の概要
Hash を options として渡すことで、起動される子プロセスの
* プロセスグ... -
Kernel
. # spawn(program , *args) -> Integer (8007.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...り、第2要素が「みせかけ」のプロ
グラム名になります。
また、第1要素はフルパスで指定しなくても環境変数 PATH から探します。
=== option引数の概要
Hash を options として渡すことで、起動される子プロセスの
* プロセスグ... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (8007.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...り、第2要素が「みせかけ」のプロ
グラム名になります。
また、第1要素はフルパスで指定しなくても環境変数 PATH から探します。
@param program 文字列か2要素の配列です。
@param args program に渡す引数を 0 個以上指定する
@param...