114件ヒット
[1-100件を表示]
(0.050秒)
別のキーワード
ライブラリ
- ビルトイン (30)
-
irb
/ cmd / help (12) -
irb
/ context (12) -
irb
/ extend-command (12) - optparse (24)
- rake (12)
- win32ole (12)
クラス
- Fiber (18)
-
IRB
:: Context (12) -
IRB
:: ExtendCommand :: Help (12) - OptionParser (24)
-
Process
:: Status (12) - WIN32OLE (12)
モジュール
- FileUtils (12)
-
IRB
:: ExtendCommandBundle (12)
検索結果
先頭5件
-
IRB
:: Context # exit(ret = 0) -> object (18214.0) -
irb を終了します。ret で指定したオブジェクトを返します。
...irb を終了します。ret で指定したオブジェクトを返します。
@param ret 戻り値を指定します。
@see IRB.irb_exit... -
IRB
:: ExtendCommandBundle # irb _ exit(ret = 0) -> object (6208.0) -
irb を終了します。ret で指定したオブジェクトを返します。
...irb を終了します。ret で指定したオブジェクトを返します。
@param ret 戻り値を指定します。
ユーザが直接使用するものではありません。... -
OptionParser
# on _ tail(*arg , &block) -> self (143.0) -
オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。
...す。
--version や --help の説明をサマリの最後に表示したい時に便利です。
@param arg OptionParser#on と同様です。
@param block OptionParser#on と同様です。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init"......ts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
puts opts.help
# => Usage: test [options]
# -i, --init
# -u, --update
# -h, --help
//}
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end......opts.on_tail("--version", "Show version") do
puts OptionParser::Version.join('.')
exit
end
//}
@see OptionParser#on, OptionParser#on_head... -
Fiber
# raise -> object (131.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...3つ目の引数に
例外発生時のスタックトレースを指定できます。
@param message 例外のメッセージとなる文字列です。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定......{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
Fiber
# raise(exception , message = nil , backtrace = nil) -> object (131.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...3つ目の引数に
例外発生時のスタックトレースを指定できます。
@param message 例外のメッセージとなる文字列です。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定......{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
Fiber
# raise(message) -> object (131.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...3つ目の引数に
例外発生時のスタックトレースを指定できます。
@param message 例外のメッセージとなる文字列です。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定......{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (113.0) -
RI から Ruby のドキュメントを参照します。
...RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソ......an use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(pattern) -> matchdata or nil
str.match(pattern, pos) -> matchdata or nil
...... -
OptionParser
# separator(sep) -> () (113.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...ッドを呼びます。
@param sep サマリの区切りを文字列で指定します。
//emlist[][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 # >>(num) -> Integer (113.0) -
self.to_i >> num と同じです。
...self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99... -
WIN32OLE
# ole _ respond _ to?(name) -> bool (113.0) -
指定したメソッドをオブジェクトがサポートしているか調べます。
...を調べます。
なお、OLEオートメーションの仕様により、メソッド名の大文字、小文字は区別
されません。
@param name 調べるメソッド名を文字列またはシンボルで指定します。
@return nameで指定したメソッドをオブジェクト......が提供していれば真を返します。
excel = WIN32OLE.new('Excel.Application')
excel.ole_respond_to?(:quit) #=> true
excel.ole_respond_to?(:exit) #=> false...