るりまサーチ

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

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. zlib end

検索結果

<< 1 2 3 ... > >>

Net::POPMail#all {|str| .... } -> nil (18336.0)

メールを受信します。

...ます。

pop, all, mail はすべて同じ効果ですが、
all
と mail は obsolete です。


使用例:

require 'net/pop'

Net::POP3.start('pop.example.com', 110,
'YourAccount', 'YourPassword') {|pop|
pop.mails.each do |m|
puts m.pop
end

}


ブロッ...
...る例:
require 'net/pop'

Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end

end

}

@param io メールの内容を書きこむオブジェクト
@raise TimeoutError 通信がタイムアウトした場合に発生し...

Net::POPMail#all -> String (18236.0)

メールを受信します。

...ます。

pop, all, mail はすべて同じ効果ですが、
all
と mail は obsolete です。


使用例:

require 'net/pop'

Net::POP3.start('pop.example.com', 110,
'YourAccount', 'YourPassword') {|pop|
pop.mails.each do |m|
puts m.pop
end

}


ブロッ...
...る例:
require 'net/pop'

Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end

end

}

@param io メールの内容を書きこむオブジェクト
@raise TimeoutError 通信がタイムアウトした場合に発生し...

Net::POPMail#all(io) -> object (18236.0)

メールを受信します。

...ます。

pop, all, mail はすべて同じ効果ですが、
all
と mail は obsolete です。


使用例:

require 'net/pop'

Net::POP3.start('pop.example.com', 110,
'YourAccount', 'YourPassword') {|pop|
pop.mails.each do |m|
puts m.pop
end

}


ブロッ...
...る例:
require 'net/pop'

Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end

end

}

@param io メールの内容を書きこむオブジェクト
@raise TimeoutError 通信がタイムアウトした場合に発生し...

IRB::ExtendCommandBundle.def_extend_command(cmd_name, cmd_class, load_file = nil, *aliases) -> object (9307.0)

irb に cmd_name で指定したメソッドが実行できるように拡張します。

...クラス名を Symbol、
String、Class のいずれかで指定します。
なお、このクラスは IRB::ExtendCommand 以下で定義
する必要があります。

@param load_file 指定したメソッドが定義されたファイル名...
...す。複数指定する事ができます。フラグは
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY、
IRB::ExtendCommandBundle::OVERRIDE_ALL のいずれか
を指定します。...

Kernel.#caller_locations(start = 1, length = nil) -> [Thread::Backtrace::Location] | nil (6443.0)

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

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

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...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)
# => ["/Users/user/test.rb:...
....rb:17:in `<main>'"]
# => [9, 13, 17]
# => ["/Users/user/test.rb", "/Users/user/test.rb", "/Users/user/test.rb"]
test3(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/...

絞り込み条件を変える

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

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

...て返します。

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

引数で指定した値が範囲外の場合は nil を返します。

@param start long の範囲を超えない正の整数...
...ernel.#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'", "-:13:in `<main>'"]
# ["-:10:in `bar'", "-:13:in `<main>'"]
# ["-:13:in `<main>'"]
# []
# nil
//}...
...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 (6369.0)

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

...て返します。

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

引数で指定した値が範囲外の場合は nil を返します。

@param start long の範囲を超えない正の整数...
...ernel.#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'", "-:13:in `<main>'"]
# ["-:10:in `bar'", "-:13:in `<main>'"]
# ["-:13:in `<main>'"]
# []
# nil
//}...
...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 (6369.0)

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

...て返します。

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

引数で指定した値が範囲外の場合は nil を返します。

@param start long の範囲を超えない正の整数...
...ernel.#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'", "-:13:in `<main>'"]
# ["-:10:in `bar'", "-:13:in `<main>'"]
# ["-:13:in `<main>'"]
# []
# nil
//}...
...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 (6343.0)

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

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

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...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)
# => ["/Users/user/test.rb:...
....rb:17:in `<main>'"]
# => [9, 13, 17]
# => ["/Users/user/test.rb", "/Users/user/test.rb", "/Users/user/test.rb"]
test3(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/...

TracePoint#callee_id -> Symbol | nil (6341.0)

イベントが発生したメソッドの呼ばれた名前を Symbol で返します。 トップレベルであった場合は nil を返します。

...場合は nil を返します。

@raise RuntimeError イベントフックの外側で実行した場合に発生します。

//emlist[][ruby]{
class C
def method_name
end

alias alias_name method_name
end


trace = TracePoint.new(:call) do |tp|
p [tp.method_id, tp.callee_id] # => [:method_n...
...ame, :alias_name]
end

trace.enable do
C.new.alias_name
end

//}

@see TracePoint#method_id...

絞り込み条件を変える

<< 1 2 3 ... > >>