122件ヒット
[1-100件を表示]
(0.117秒)
別のキーワード
ライブラリ
- ビルトイン (62)
-
cgi
/ core (24) - rake (24)
-
rubygems
/ remote _ fetcher (12)
クラス
-
Encoding
:: Converter (12) - Exception (8)
-
Gem
:: RemoteFetcher (12) - Thread (18)
モジュール
-
CGI
:: QueryExtension :: Value (24) - Enumerable (24)
-
Rake
:: TaskManager (24)
キーワード
- first (12)
-
last
_ description (12) -
last
_ description= (12) -
last
_ error (12) -
open
_ uri _ or _ path (12) -
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
slice
_ before (24)
検索結果
先頭5件
-
CGI
:: QueryExtension :: Value # last -> self (18102.0) -
@todo
@todo -
Rake
:: TaskManager # last _ description=(description) (12320.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 (9209.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
//}... -
Encoding
:: Converter # last _ error -> Exception | nil (6214.0) -
直前に変換器で発生した例外に相当する例外オブジェクトを返します。 直前の変換で例外が発生していない場合は nil を返します。
...859-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
//}... -
Thread
# report _ on _ exception -> bool (6107.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...eport_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......):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 # => #<Threa......d:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
Thread
# report _ on _ exception=(newstate) (6107.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...eport_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......):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 # => #<Threa......d:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
Exception
# full _ message(highlight: true , order: :bottom) -> String (3013.0) -
例外の整形された文字列を返します。
...は Exception.to_tty? の返り値と同じです。
@param order :top か :bottom で指定する必要があります。
バックトレースの一番奥がエラーメッセージの上(top)か下(bottom)かを指定します。
デフォルト値は Exception.to_tty?......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 = STDERR
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<m......ain>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
end
//}
@see Exception.to_tty?... -
CGI
:: QueryExtension :: Value # first -> self (3002.0) -
@todo
@todo -
Gem
:: RemoteFetcher # open _ uri _ or _ path(uri , last _ modified = nil , head = false , depth = 0) -> StringIO | File (208.0) -
@param uri URI を指定します。
...@param uri URI を指定します。
@param last_modified 最終更新時刻を指定します。
@param head 真を指定するとヘッダ情報のみ取得します。
@param depth 現在のリダイレクト回数を指定します。
@raise Gem::RemoteFetcher::FetchError デフォルトで... -
Enumerable
# slice _ before {|elt| bool } -> Enumerator (13.0) -
パターンがマッチした要素、もしくはブロックが真を返した要素から 次にマッチする手前までを チャンク化(グループ化)したものを繰り返す Enumerator を 返します。
...e {|line| /\A\S/ === line }.each {|e| pp e}
}
# "svn proplist -R" の結果を分割する
# これは一要素が複数行にまたがっている
IO.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) {|f|
f.lines.slice_before(/\AProp/).each {|lines| p lines }
}
#=> ["Properties on '.':\n", " s......より簡単な例も参照)。
//emlist[][ruby]{
a = [0,2,3,4,6,7,9]
prev = a[0]
p a.slice_before {|e|
prev, prev2 = e, prev
prev2 + 1 != e
}.map {|es|
es.length <= 2 ? es.join(",") : "#{es.first}-#{es.last}"
}.join(",")
#=> "0,2-4,6,7,9"
//}
@see Enumerable#chunk, Enumerable#slice_after...