378件ヒット
[1-100件を表示]
(0.101秒)
種類
- インスタンスメソッド (148)
- モジュール関数 (99)
- 特異メソッド (87)
- 文書 (33)
- 定数 (11)
ライブラリ
- ビルトイン (126)
- coverage (7)
-
irb
/ extend-command (11) -
net
/ pop (121) - objspace (11)
- psych (14)
- rake (22)
-
rake
/ packagetask (11) -
rubygems
/ dependency _ installer (22)
クラス
- Coverage (7)
-
Gem
:: DependencyInstaller (22) - Module (16)
-
Net
:: POP3 (22) -
Net
:: POPMail (99) -
Rake
:: Application (11) -
Rake
:: PackageTask (11) - SystemCallError (11)
- TracePoint (11)
モジュール
-
IRB
:: ExtendCommandBundle (11) - Kernel (88)
- ObjectSpace (11)
- Psych (14)
- Rake (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
DEFAULT
_ OPTIONS (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
_ _ callee _ _ (11) - application= (11)
-
callee
_ id (11) - caller (33)
-
caller
_ locations (22) -
def
_ extend _ command (11) -
delete
_ all (22) - errno (11)
- fail (11)
- load (14)
- mail (33)
-
memsize
_ of _ all (11) - new (22)
- pop (33)
- public (16)
- raise (11)
-
ruby 1
. 8 . 4 feature (11) - start (7)
検索結果
先頭5件
-
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...