111件ヒット
[1-100件を表示]
(0.189秒)
ライブラリ
- ビルトイン (56)
-
cgi
/ core (22) - rake (22)
-
rubygems
/ remote _ fetcher (11)
クラス
-
Encoding
:: Converter (11) - Exception (7)
-
Gem
:: RemoteFetcher (11) - Thread (16)
モジュール
-
CGI
:: QueryExtension :: Value (22) - Enumerable (22)
-
Rake
:: TaskManager (22)
キーワード
- first (11)
-
last
_ description (11) -
last
_ description= (11) -
last
_ error (11) -
open
_ uri _ or _ path (11) -
report
_ on _ exception (8) -
report
_ on _ exception= (8) -
slice
_ before (22)
検索結果
先頭5件
-
CGI
:: QueryExtension :: Value # last -> self (21102.0) -
@todo
@todo -
Rake
:: TaskManager # last _ description=(description) (18420.0) -
最新の詳細説明をセットします。
...の記載例とする
task default: :test_rake_app1
desc "test1"
task :test_rake_app1 do |task|
task.application.last_description # => "test2"
task.application.last_description = "test3"
task.application.last_description # => "test3"
end
desc "test2"
task :test_rake_app2 do |task|
end
//}... -
Rake
:: TaskManager # last _ description -> String (15309.0) -
Rakefile 内の最新の詳細説明を追跡するためのメソッドです。
...詳細説明を追跡するためのメソッドです。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app1
desc "test1"
task :test_rake_app1 do |task|
p task.application.last_description # => "test2"
end
desc "test2"
task :test_rake_app2 do |task|
end
//}... -
Thread
# report _ on _ exception -> bool (12207.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
..._on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run......@(irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<......Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
Thread
# report _ on _ exception=(newstate) (12207.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
..._on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run......@(irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<......Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
Encoding
:: Converter # last _ error -> Exception | nil (9314.0) -
直前に変換器で発生した例外に相当する例外オブジェクトを返します。 直前の変換で例外が発生していない場合は nil を返します。
...合は nil を返します。
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "iso-8859-1")
p ec.primitive_convert(src="\xf1abcd", dst="") #=> :invalid_byte_sequence
p ec.last_error #=> #<Encoding::InvalidByteSequenceError: "\xF1" followed by "a" on UTF-8>
p ec.primitive_convert(......src, dst, nil, 1) #=> :destination_buffer_full
p ec.last_error #=> nil
//}... -
Gem
:: RemoteFetcher # open _ uri _ or _ path(uri , last _ modified = nil , head = false , depth = 0) -> StringIO | File (6308.0) -
@param uri URI を指定します。
...@param uri URI を指定します。
@param last_modified 最終更新時刻を指定します。
@param head 真を指定するとヘッダ情報のみ取得します。
@param depth 現在のリダイレクト回数を指定します。
@raise Gem::RemoteFetcher::FetchError デフォルトで... -
Exception
# full _ message(highlight: true , order: :bottom) -> String (6131.0) -
例外の整形された文字列を返します。
...は Exception.to_tty? の返り値と同じです。
@param order :top か :bottom で指定する必要があります。
バックトレースの一番奥がエラーメッセージの上(top)か下(bottom)かを指定します。
デフォルト値は Exception.to_tty?......st[例][ruby]{
begin
raise "test"
rescue => e
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
$stderr = $stdout
p e.full_message # => "test.rb:2:in `<main>': test (RuntimeError)\n"
$stderr = STDE......RR
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
end
//}
@see Exception.to_tty?... -
CGI
:: QueryExtension :: Value # first -> self (6002.0) -
@todo
@todo -
Enumerable
# slice _ before {|elt| bool } -> Enumerator (3173.0) -
パターンがマッチした要素、もしくはブロックが真を返した要素から 次にマッチする手前までを チャンク化(グループ化)したものを繰り返す Enumerator を 返します。
...しくはブロックが真を返した要素から
次にマッチする手前までを
チャンク化(グループ化)したものを繰り返す Enumerator を
返します。
パターンを渡した場合は各要素に対し === が呼び出され、
それが真になったところをチ......クは配列として表現されます。
Enumerable#to_a や Enumerable#map のようなメソッドを使うこ
ともできます。
//emlist[例][ruby]{
# 偶数要素をチャンクの先頭と見なす
[0,2,4,1,2,4,5,3,1,4,2].slice_before(&:even?).to_a
# => [[0], [2], [4, 1], [2], [4, 5, 3,......[1, 4, 2]]
# ChangeLog のエントリーを順に取る
open("ChangeLog") {|f|
f.slice_before(/\A\S/).each {|e| pp e}
}
# 上と同じだが、パターンでなくブロックを使う
open("ChangeLog") {|f|
f.slice_before {|line| /\A\S/ === line }.each {|e| pp e}
}
# "svn proplist -R" の...