97件ヒット
[1-97件を表示]
(0.073秒)
クラス
-
Logger
:: Application (1) -
Net
:: IMAP (12) - Object (12)
-
OpenSSL
:: BN (12) - Pathname (12)
-
Rake
:: InvocationChain (12)
モジュール
- Enumerable (12)
- Exception2MessageMapper (24)
検索結果
先頭5件
- Exception2MessageMapper
# Raise(exception _ class = nil , *rest) -> () - Object
# pretty _ print _ inspect -> String - Net
:: IMAP # append(mailbox , message , flags = nil , date _ time = nil) -> Net :: IMAP :: TaggedResponse - Rake
:: InvocationChain # append(task _ name) -> Rake :: InvocationChain - Exception2MessageMapper
# Fail(exception _ class = nil , *rest) -> ()
-
Exception2MessageMapper
# Raise(exception _ class = nil , *rest) -> () (18132.0) -
登録されている情報を使用して、例外を発生させます。
...est メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。
例:
class Foo
extend Exception2MessageMapper
p def_exception :NewExceptionClass,......# =>
def foo
Raise NewExceptionClass, 1, 2, 3
end
end
Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。
Foo.Raise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and... -
Object
# pretty _ print _ inspect -> String (8007.0) -
Object#pretty_print を使って Object#inspect と同様に オブジェクトを人間が読める形式に変換した文字列を返します。
...ェクトに Object#pretty_print が定義されている必要があります。
そうでない場合には RuntimeError が発生します。
@raise RuntimeError 出力する全てのオブジェクトに Object#pretty_print が定義されて
いない場合に発生しま... -
Net
:: IMAP # append(mailbox , message , flags = nil , date _ time = nil) -> Net :: IMAP :: TaggedResponse (6107.0) -
APPEND コマンドを送ってメッセージをメールボックスの末尾に追加します。
...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 flags メッセージに付加するフラグ(Symbol の配列)
@param date_time メッセージの時刻(Time オブジェクト)。省略時は現在時刻が使われる
@raise Net::IMAP::NoResponseError メールボックスが存在しない場合に発生します... -
Rake
:: InvocationChain # append(task _ name) -> Rake :: InvocationChain (6107.0) -
与えられたタスク名を追加して新しい Rake::InvocationChain を返します。
...追加するタスク名を指定します。
@raise RuntimeError 循環したタスクの呼び出しを検出した場合に発生します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
invocation_chain= Rake::InvocationChain.new......("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.append("task_b") # => LL("task_b", "task_a")
end
//}... -
Exception2MessageMapper
# Fail(exception _ class = nil , *rest) -> () (3032.0) -
登録されている情報を使用して、例外を発生させます。
...est メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。
例:
class Foo
extend Exception2MessageMapper
p def_exception :NewExceptionClass,......# =>
def foo
Raise NewExceptionClass, 1, 2, 3
end
end
Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。
Foo.Raise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and... -
Exception2MessageMapper
# def _ e2message(exception _ class , message _ format) -> Class (3007.0) -
すでに存在する例外クラス exception_class に、 エラーメッセージ用フォーマット message_format を関連づけます。
...エラーメッセージ用フォーマット message_format を関連づけます。
このフォーマットは Exception2MessageMapper#Raise,
Exception2MessageMapper#Fail で使用します。
@param exception_class メッセージを登録する例外クラスを指定します。
@param mess... -
Exception2MessageMapper
# fail(exception _ class = nil , *rest) -> () (3007.0) -
登録されている情報を使用して、例外を発生させます。
...して、例外を発生させます。
@param exception_class 例外クラス。
@param rest メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。... -
Logger
:: Application # start -> () (3007.0) -
アプリケーションをスタートさせます。
...アプリケーションをスタートさせます。
@return run メソッドの返値を返します。
@raise RuntimeError サブクラスで run メソッドを定義していない場合に発生します。... -
Enumerable
# chunk {|elt| . . . } -> Enumerator (19.0) -
要素を前から順にブロックで評価し、その結果によって 要素をチャンクに分けた(グループ化した)要素を持つ Enumerator を返します。
...by]{
sep = "-"*72 + "\n" # ハイフンが72個の行
IO.popen("svn log README") {|f|
f.chunk {|line|
line != sep || nil
}.each {|_, lines|
pp lines
}
}
#=> ["r20018 | knu | 2008-10-29 13:20:42 +0900 (Wed, 29 Oct 2008) | 2 lines\n",
# "\n",
# "* README, README.ja: Update the port......たい場合にも nil が使えます。
//emlist[例][ruby]{
File.foreach("README").chunk {|line|
/\A\s*\z/ !~ line || nil
}.each {|_, lines|
pp lines
}
//}
「:_alone」は要素を素通ししたい場合に用います。
以下の例では「Foo#bar」という形式の行が連続して......A[A-Z][A-Za-z0-9_]+\#/
open(filename) {|f|
f.chunk {|line| pat =~ line ? $& : :_alone }.each {|key, lines|
if key != :_alone
print lines.sort.join('')
else
print lines.join('')
end
}
}
//}
@raise RuntimeError 予約されている値を用いた場合に発生します... -
OpenSSL
:: BN # <<(other) -> OpenSSL :: BN (19.0) -
自身を other ビット左シフトした値を返します。
...自身を other ビット左シフトした値を返します。
//emlist[][ruby]{
bn = 1.to_bn
pp bn << 1 # => #<OpenSSL::BN 2>
pp bn # => #<OpenSSL::BN 1>
//}
@param other シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#lshift!... -
Pathname
# entries -> [Pathname] (19.0) -
self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。
...Pathname オブジェクトの配列を返します。
@raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。
//emlist[例][ruby]{
require 'pathname'
require 'pp'
pp Pathname('/usr/local').entries
# => [#<Pathname:.>,
# #<P...