るりまサーチ

最速Rubyリファレンスマニュアル検索!
114件ヒット [1-100件を表示] (0.158秒)

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

IRB::Context#exit(ret = 0) -> object (24214.0)

irb を終了します。ret で指定したオブジェクトを返します。

...irb を終了します。ret で指定したオブジェクトを返します。

@param ret 戻り値を指定します。

@see IRB.irb_exit...

IRB::ExtendCommandBundle#irb_exit(ret = 0) -> object (12208.0)

irb を終了します。ret で指定したオブジェクトを返します。

...irb を終了します。ret で指定したオブジェクトを返します。

@param ret 戻り値を指定します。

ユーザが直接使用するものではありません。...

IRB::ExtendCommand::Help#execute(*names) -> nil (9113.0)

RI から Ruby のドキュメントを参照します。

...RI から Ruby のドキュメントを参照します。

irb(main):001:0> help String#match
...

@param names 参照したいクラス名やメソッド名などを文字列で指定します。

names を指定しなかった場合は、RI を対話的なモードで起動します。メソ...
...Enter the method name you want to look up.
You can 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#on_tail(*arg, &block) -> self (6125.0)

オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。

...@param arg OptionParser#on と同様です。

@param block OptionParser#on と同様です。

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.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

en...
...d
//}

@see OptionParser#on, OptionParser#on_head...

OptionParser#separator(sep) -> () (6113.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.libra...
...ry << lib
end

opts.separator ""
opts.separator "Common options:"

opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit

end
//}...

絞り込み条件を変える

WIN32OLE#ole_respond_to?(name) -> bool (6113.0)

指定したメソッドをオブジェクトがサポートしているか調べます。

...ん。

@param name 調べるメソッド名を文字列またはシンボルで指定します。

@return nameで指定したメソッドをオブジェクトが提供していれば真を返します。

excel = WIN32OLE.new('Excel.Application')
excel.ole_respond_to?(:quit) #=> true
exce...
...l.ole_respond_to?(:exit) #=> false...

FileUtils#sh(*cmd) {|result, status| ... } (3113.0)

与えられたコマンドを実行します。

...@param cmd 引数の解釈に関しては Kernel.#exec を参照してください。


例:
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.exitstatu...
...s})"
end
end

@see Kernel.#exec, Kernel.#system...

Process::Status#>>(num) -> Integer (3113.0)

self.to_i >> num と同じです。

...self.to_i >> num と同じです。

@param num 整数を指定します。

fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99...

Fiber#raise -> object (131.0)

selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。

...さない場合、RuntimeError が発生します。
message 引数を渡した場合、message 引数をメッセージとした RuntimeError
が発生します。

その他のケースでは、最初の引数は Exception か Exception
のインスタンスを返す exception メソッドを持...
...ースを指定できます。

@param message 例外のメッセージとなる文字列です。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定します。

//emlist[例][ruby]{
f = Fiber.new { Fiber.y...
...ield }
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
//}...
<< 1 2 > >>