るりまサーチ

最速Rubyリファレンスマニュアル検索!
174件ヒット [1-100件を表示] (0.025秒)
トップページ > クエリ:all[x] > モジュール:Kernel[x]

別のキーワード

  1. _builtin all?
  2. pop delete_all
  3. pop3 delete_all
  4. net/pop delete_all
  5. pop all

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Kernel#install -> () (6101.0)

ファイルをコピーし、その属性を設定します。

...性を設定します。


ruby -run -e install -- [OPTION] SOURCE DEST

-p ファイルのアクセス時刻と修正時刻を保持します。
-m chmod と同じようにファイルのパーミッションを設定します。
-v 詳細表示

@see install(1)...

Kernel#install_files(mfile, ifiles, map = nil, srcprefix = nil) -> [] (6101.0)

このメソッドは create_makefile, install_rb が使用します。 内部用のメソッドです。

...このメソッドは create_makefile, install_rb が使用します。
内部用のメソッドです。

@param mfile Makefile を表す File のインスタンスです。

@param ifiles インストールするファイルのリストを指定します。

@param map ???

@param srcprefix ソ...

Kernel#install_rb(mfile, dest, srcdir = nil) -> Array (6101.0)

このメソッドは create_makefile が使用します。 内部用のメソッドです。

このメソッドは create_makefile が使用します。
内部用のメソッドです。

ディレクトリ srcdir/lib 配下の Ruby スクリプト (*.rb ファイル)
を dest にインストールするための Makefile 規則を mfile に出力します。

srcdir/lib のディレクトリ構造はそのまま dest 配下に反映されます。

@param mfile Makefile を表す File のインスタンスです。

@param dest インストールする先のディレクトリを指定します。

@param srcdir ソースディレクトリを指定します。

Kernel.#__callee__ -> Symbol | nil (6101.0)

現在のメソッド名を返します。 メソッドの外で呼ばれると nil を返します。

...//emlist[例][ruby]{
def foo
p __callee__
end
alias :bar :foo
foo # => :foo
bar # => :bar
p __callee__ # => nil
//}

Kernel
.#__method__ とは異なり、現在のメソッド名が alias されたメ
ソッドの場合には alias 先のメソッド名を返します。

@see Kernel.#__method__...

Kernel.#callcc {|cont| .... } -> object (6101.0)

継続を作成します。 Continuation を参照してください。

継続を作成します。 Continuation を参照してください。

絞り込み条件を変える

Kernel.#caller(range) -> [String] | nil (6101.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...情報を $@
の形式のバックトレース(文字列の配列)として返します。

トップレベルでは空の配列を返します。caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。

引数で指定した値が範囲外の場合は nil を...
...範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel
.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end

def bar
foo
end

bar

#=> ["-:2:in `foo'", "-:10:in `bar'...
...aller の要素から [ファイル名, 行番号, メソッド名]
を取り出して返します。

//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(call...

Kernel.#caller(start = 1) -> [String] | nil (6101.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...情報を $@
の形式のバックトレース(文字列の配列)として返します。

トップレベルでは空の配列を返します。caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。

引数で指定した値が範囲外の場合は nil を...
...範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel
.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end

def bar
foo
end

bar

#=> ["-:2:in `foo'", "-:10:in `bar'...
...aller の要素から [ファイル名, 行番号, メソッド名]
を取り出して返します。

//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(call...

Kernel.#caller(start, length) -> [String] | nil (6101.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...情報を $@
の形式のバックトレース(文字列の配列)として返します。

トップレベルでは空の配列を返します。caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。

引数で指定した値が範囲外の場合は nil を...
...範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel
.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end

def bar
foo
end

bar

#=> ["-:2:in `foo'", "-:10:in `bar'...
...aller の要素から [ファイル名, 行番号, メソッド名]
を取り出して返します。

//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(call...

Kernel.#caller_locations(range) -> [Thread::Backtrace::Location] | nil (6101.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...]{
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, nil)
# => ["/...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...
<< 1 2 > >>