318件ヒット
[201-300件を表示]
(0.098秒)
ライブラリ
- ビルトイン (150)
-
irb
/ cmd / help (12) -
irb
/ context (12) -
irb
/ extend-command (12) - monitor (60)
- optparse (36)
- pty (12)
- rake (12)
- win32ole (12)
クラス
- Fiber (18)
-
IRB
:: Context (12) -
IRB
:: ExtendCommand :: Help (12) - LocalJumpError (12)
- Monitor (36)
- OptionParser (36)
-
PTY
:: ChildExited (12) -
Process
:: Status (48) - SystemExit (24)
- Thread (48)
- WIN32OLE (12)
モジュール
- FileUtils (12)
-
IRB
:: ExtendCommandBundle (12) - MonitorMixin (24)
検索結果
先頭5件
-
OptionParser
# separator(sep) -> () (6107.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...list[][ruby]{
require 'optparse'
opts = OptionParser.new
opts.banner = "Usage: example.rb [options]"
opts.separator ""
opts.separator "Specific options:"
opts.on("-r", "--require LIBRARY") do |lib|
options.library << lib
end
opts.separator ""
opts.separator "Common options:"
opts.on_tail......("-h", "--help", "Show this message") do
puts opts
exit
end
//}... -
Process
:: Status # to _ i -> Integer (6107.0) -
C 言語での終了ステータス表現の整数を返します。
...C 言語での終了ステータス表現の整数を返します。
多くのシステムの実装では、この値の上位 8 bit に exit(2)
に渡した終了ステータスが、下位 8 bit にシグナル等で終了した等の情
報が入っています。... -
Thread
# status -> String | false | nil (6107.0) -
生きているスレッドの状態を文字列 "run"、"sleep", "aborting" のいず れかで返します。正常終了したスレッドに対して false、例外によ り終了したスレッドに対して nil を返します。
..."aborting" のいず
れかで返します。正常終了したスレッドに対して false、例外によ
り終了したスレッドに対して nil を返します。
Thread#alive? が真を返すなら、このメソッドも真です。
例:
a = Thread.new { raise("die now") }
b = Threa...... Thread.stop }
c = Thread.new { Thread.exit }
d = Thread.new { sleep }
d.kill #=> #<Thread:0x401b3678 aborting>
a.status #=> nil
b.status #=> "sleep"
c.status #=> false
d.status #=> "aborting"
Thread.current.......status #=> "run"
@see Thread#alive?, Thread#stop?... -
WIN32OLE
# ole _ respond _ to?(name) -> bool (6107.0) -
指定したメソッドをオブジェクトがサポートしているか調べます。
...ド名を文字列またはシンボルで指定します。
@return nameで指定したメソッドをオブジェクトが提供していれば真を返します。
excel = WIN32OLE.new('Excel.Application')
excel.ole_respond_to?(:quit) #=> true
excel.ole_respond_to?(:exit) #=> false... -
Thread
# kill -> self (6026.0) -
スレッドの実行を終了させます。終了時に ensure 節が実行されます。
...す。
ただし、スレッドは終了処理中(aborting)にはなりますが、
直ちに終了するとは限りません。すでに終了している場合は何もしません。このメソッドにより
終了したスレッドの Thread#value の返り値は不定です。
自身がメ......#exit(0)
により終了します。
Kernel.#exit と違い例外 SystemExit を発生しません。
th1 = Thread.new do
begin
sleep 10
ensure
p "this will be displayed"
end
end
sleep 0.1
th1.kill
#=> "this will be displayed"
@see Kernel.#exit, Kernel.#exit!... -
SystemExit
# success? -> bool (6013.0) -
終了ステータスが正常終了を示す値ならば true を返します。
...終了を示す値ならば true を返します。
大半のシステムでは、ステータス 0 が正常終了を表します。
例:
begin
exit true
rescue SystemExit => err
p err.success? # => true
end
begin
exit false
rescue SystemExit => err
p err.success? #... -
FileUtils
# sh(*cmd) {|result , status| . . . } (3107.0) -
与えられたコマンドを実行します。
...参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitstatus})"
end
end
@see Kernel.#exec, Kernel.#system... -
OptionParser
# ver -> String (3107.0) -
program_name、version と release から生成したバージョンを表す文字列を返します。
...。
//emlist[例][ruby]{
require "optparse"
OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.program_name = "Optparse Example"
opts.version = [0, 1]
opts.release = "2019-05-01"
opts.on_tail("--version", "Show version") do
puts opts.ver # => "Optparse Examp......le 0.1 (2019-05-01)"
exit
end
opts.parse!(ARGV)
end
//}... -
Process
:: Status # >>(num) -> Integer (3107.0) -
self.to_i >> num と同じです。
...self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99...