71件ヒット
[1-71件を表示]
(0.015秒)
別のキーワード
種類
- インスタンスメソッド (33)
- 文書 (22)
- モジュール関数 (16)
クラス
- Logger (11)
-
Net
:: IMAP (11) - OptionParser (11)
モジュール
- Timeout (16)
キーワード
- append (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) - separator (11)
- timeout (16)
検索結果
先頭5件
-
Logger
# <<(msg) -> Integer | nil (18118.0) -
ログを出力します。
...ログを出力します。
@param msg ログに出力するメッセージ。
//emlist[例][ruby]{
require 'logger'
logger = Logger.new(STDOUT)
logger << "add message"
# => add message
//}... -
Net
:: IMAP # append(mailbox , message , flags = nil , date _ time = nil) -> Net :: IMAP :: TaggedResponse (113.0) -
APPEND コマンドを送ってメッセージをメールボックスの末尾に追加します。
...例:
imap.append("inbox", <<EOF.gsub(/\n/, "\r\n"), [:Seen], Time.now)
Subject: hello
From: someone@example.com
To: somebody@example.com
hello world
EOF
@param mailbox メッセージを追加するメールボックス名(文字列)
@param message メッセージ文字列
@param... -
Timeout
. # timeout(sec , exception _ class , message) {|i| . . . } -> object (113.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...トする時間を秒数で指定します.
@param exception_class タイムアウトした時、発生させる例外を指定します.
@param message エラーメッセージを指定します.省略した場合は
"execution expired" になります.
例 長い計算のタイム......部コマンドのタイムアウト
require 'timeout'
# テスト用のシェルをつくる。
File.open("loop.sh", "w"){|fp|
fp.print <<SHELL_EOT
#!/bin/bash
S="scale=10"
M=32767
trap 'echo "$S; $m1/($m1+$m2)*4" | bc ; echo "count = $((m1+m2))" ; exit 0' INT
m1=0
m2=0... -
ruby 1
. 6 feature (54.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...n `upcase!': can't modify frozen string (TypeError)
from -:3
ruby 1.6.7 (2002-08-01) [i586-linux]
: 2002-06-10 Fixnum#>>, <<
負の数に対して右シフトすると 0 になることがありました。
((<ruby-bugs-ja:PR#247>))
負の数を引数にした左......p(-1 >> 31)
=> ruby 1.6.7 (2002-03-01) [i586-linux]
0
=> ruby 1.6.7 (2002-08-01) [i586-linux]
-1
p(-1 << -1)
=> ruby 1.6.7 (2002-03-01) [i586-linux]
-2147483649
=> ruby 1.6.7 (2002-08-01) [i586-linux]
-1
: 2002-06......)
class C
def initialize
@message = 'ok'
end
attr_reader :message
end
puts C.new.message(1,2,3)
=> ruby 1.6.4 (2001-06-04) [i586-linux]
ok
=> ruby 1.6.4 (2001-08-06) [i586-linux]
-:7:in `message': wrong # of arguments(3 for 0) (ArgumentEr... -
ruby 1
. 8 . 3 feature (18.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...05-05-16
: singleton class [ruby] [change]
特異クラスは複製できなくなりました。((<ruby-talk:142749>))
$ ruby-1.8.3 -e 'class << "str"; self end.dup'
-e:1:in `initialize_copy': can't copy singleton class (TypeError)
from -e:1
=== 2005-05-15
: Pathname#unlink......追加 ((<ruby-dev:25670>))
=== 2005-02-06
: Resolv::DNS::Resource::TXT#strings [lib] [new]
: Resolv::DNS::Message::MessageEncoder#put_string_list [lib] [new]
: Resolv::DNS::Message::MessageDecoder#get_string_list [lib] [new]
追加。((<ruby-talk:129732>))
=== 2005-02-04
: RSS Parser/Maker [l... -
Timeout
. # timeout(sec , exception _ class = nil) {|i| . . . } -> object (13.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...トする時間を秒数で指定します.
@param exception_class タイムアウトした時、発生させる例外を指定します.
@param message エラーメッセージを指定します.省略した場合は
"execution expired" になります.
例 長い計算のタイム......部コマンドのタイムアウト
require 'timeout'
# テスト用のシェルをつくる。
File.open("loop.sh", "w"){|fp|
fp.print <<SHELL_EOT
#!/bin/bash
S="scale=10"
M=32767
trap 'echo "$S; $m1/($m1+$m2)*4" | bc ; echo "count = $((m1+m2))" ; exit 0' INT
m1=0
m2=0... -
OptionParser
# separator(sep) -> () (12.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...= "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
//}...