るりまサーチ

最速Rubyリファレンスマニュアル検索!
240件ヒット [1-100件を表示] (0.076秒)
トップページ > クエリ:-[x] > クエリ:of[x] > 種類:ライブラリ[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

検索結果

<< 1 2 3 > >>

profile (6019.0)

Ruby プログラムのためのプロファイラです。 プロファイラとは効率改善のための調査に用いられるツールのことです。 profile ライブラリは各メソッドの実行時間に関する統計を出力します。

...profile ライブラリは各メソッドの実行時間に関する統計を出力します。

profile はそれ自身がオーバーヘッドになる
ためメソッド呼び出しあたりの処理時間がかなり遅くなります。

=== 使い方

以下のように、ruby に -r profile...
...オプションを付けて実行します。

$ ruby -r profile foo.rb

foo.rb の実行が終わると標準エラー出力にプロファイルが出力されます。

プロファイルは各メソッドの実行時間に関する統計からなりますが、
この時間には大きく分...
...正味時間と呼ぶことにします。

=== 出力の意味

プロファイルの結果は例えば次のようになります。

$ ruby -r profile sample/sieve.rb 1000
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 … 略 …
% cumulative self self total...

rubygems/security (373.0)

このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。

...するとそれらを作成することができます。

# gemmaster@example.com のための秘密鍵と証明書を作成します
$ gem cert --build gemmaster@example.com

あなたのコンピュータの性能にもよりますが、これには 5 秒から 10 分程度かかります。...
...カレントディレクトリに "gem-private_key.pem", "gem-public_cert.pem"
の二つのファイルができます。

まずは、なるべくあなただけがアクセスできる場所に "gem-private_key.pem" を移動させて
ください。 FD, CD-ROM など同じくらい安全なもの...
...の例では Imlib2-Ruby を使用しますが、
あなたは好きな Gem を使用してもいいですよ。あなたの gemspec ファイルを開いて
以下の内容を追加してください。

# signing key and certificate chain
s.signing_key = '/mnt/floppy/gem-private_key.pem'...

rdoc (295.0)

RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。

...れば、'rdoc' コマンドでドキュメントが生成できます。
(Windows では 'rdoc.bat' です)

$ rdoc [options] [names...]

"rdoc --help" と打てば、最新のオプションに関する情報が得られます。

$ rdoc

このコマンドでカレントディレクトリ以...
...とができます。
例えば、Rdoc そのもののドキュメントを生成する場合は、以下のようにタイプ
します。

$ rdoc --main rdoc/rdoc.rb

RDoc が生成するドキュメントのコメント部で使える様々なマークアップの方法
は以下の markup の...
...され
ます。末尾が .c であるファイルはCのソースとして処理されます。それ以外の
ファイルは単なる SimpleMarkup-style で記述されたファイルとして処理され
ます(行の先頭に「#」というコメント記号があってもなくても同じよ...

optparse (283.0)

コマンドラインのオプションを取り扱うためのライブラリです。

...以下はオプション -a, -b を受け付けるコマンドを作成する例です。

//emlist[sample.rb][ruby]{
require 'optparse'
opt = OptionParser.new

opt.on('-a') {|v| p v }
opt.on('-b') {|v| p v }

opt.parse!(ARGV)
p ARGV
//}

ruby sample.rb -a foo bar -b baz
# => true...
...の例で、-b はオプションと
して認識されている)。ただし、環境変数 POSIXLY_CORRECT が定義してあると
この挙動は変更されます。

env POSIXLY_CORRECT=1 ruby ./sample.rb -a foo bar -b baz
# => true # -a はオプ...
...ションと解釈
["foo", "bar", "-b", "baz"] # -b は非オプションと解釈

OptionParser#parse! により、コマンドライン(ARGV)の解析を行います。
OptionParser#parse! では、ARGV からオプションが取り除かれます。
これを避けるには O...

xmlrpc (155.0)

XML-RPC を扱うためのライブラリです。

...XML-RPC を扱うためのライブラリです。

このページは xmlrpc ライブラリのまとめのページであり、require 'xmlrpc' を実行しても
エラーになることに注意して下さい。

=== Author and Copyright

Copyright (C) 2001-2004 by Michael Neumann

Released und...
...er the same term of license as Ruby.

=== Overview

XMLRPC is a lightweight protocol that enables remote procedure calls over
HTTP. It is defined at http://www.xmlrpc.com.

XMLRPC allows you to create simple distributed computing solutions that span
computer languages. Its distinctive feature is i...
...pared to
other approaches like SOAP and CORBA.

The Ruby standard library package 'xmlrpc' enables you to create a server that
implements remote procedures and a client that calls them. Very little code
is required to achieve either of these.

=== Example

Try the following code. It calls a standa...

絞り込み条件を変える

test/unit (139.0)

ユニットテストを行うためのライブラリです。

...なりまし
た。詳しい内容は下記のプロジェクトページを参照してください。

* Test::Unit - Ruby用単体テストフレームワーク: https://test-unit.github.io/

なお、2.2.0より前のtest/unit は当時バンドルしていた minitest/unit を使って再実...
...* Rubyのテスティングフレームワークの歴史(2014年版) https://www.clear-code.com/blog/2014/11/6.html
* RubyKaigi 2015:The history of testing framework in Ruby https://www.clear-code.com/blog/2015/12/12.html

=== 使い方

Test::Unit は以下のように使います。...
...ed at -j option
-
q, --hide-skip Hide skipped tests
-
b, --basedir=DIR Base directory of test suites.
-
x, --exclude PATTERN Exclude test files on pattern.
-
Idirectory Add library load path
-
-[no-]gc-stres...

net/imap (133.0)

このライブラリは Internet Message Access Protocol (IMAP) の クライアントライブラリです。2060 を元に 実装されています。

...て Mail/sent-mail から "Mail/sent-apr03" へ移動させる

require 'net/imap'

imap = Net::IMAP.new('mail.example.com')
imap.authenticate('LOGIN', 'joe_user', 'joes_password')
imap.select('Mail/sent-mail')
if not imap.list('Mail/', 'sent-apr03')
imap.create('Mail/sent-apr03')
en...
...d
imap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id|
imap.copy(message_id, "Mail/sent-apr03")
imap.store(message_id, "+FLAGS", [:Deleted])
end
imap.expunge

=== スレッド安全性
Net::IMAP は並列実行をサポートしています。例として...
...

require 'net/imap'

imap = Net::IMAP.new("imap.foo.net", "imap2")
imap.authenticate("cram-md5", "bar", "password")
imap.select("inbox")
fetch_thread = Thread.start { imap.fetch(1..-1, "UID") }
search_result = imap.search(["BODY", "hello"])
fetch_result = fetch_thread.value
imap....

rubygems/commands/query_command (133.0)

Gem パッケージの情報を検索するためのライブラリです。

...
-
i, --[no-]installed Check for installed gem
-
v, --version VERSION Specify version of gem to query
-
n, --name-matches REGEXP 与えられた正規表現にマッチする Gem パッケージを
検索します
-
d, --...
...[no-]details Gem パッケージの詳細を表示します
-
-[no-]versions Gem パッケージ名のみ表示します
-
a, --all 見つかった Gem パッケージの全てのバージョンを表示します
Local/Remote Options:...
...-l, --local 操作をローカルに限定します
-
r, --remote 操作をリモートに限定します
-
b, --both ローカルとリモートの両方の操作を許可します
-
B, --bulk-threshold COUNT T...

bigdecimal (115.0)

bigdecimal は浮動小数点数演算ライブラリです。 任意の精度で 10 進表現された浮動小数点数を扱えます。

...sum = sum + BigDecimal("0.0001")
end
print sum # => 0.1e1
//}

//emlist[例3: 1.2 - 1.0 と 0.2 との比較][ruby]{
require "bigdecimal"

(BigDecimal("1.2") - BigDecimal("1.0")) == BigDecimal("0.2") # => true

(1.2 - 1.0) == 0.2 # => false
//}

=== 特別な値

正確な計算結果の提供の...
..."
BigDecimal("1.0") / BigDecimal("0.0") #=> Infinity
BigDecimal("-1.0") / BigDecimal("0.0") #=> -Infinity
//}

無限大を表す BigDecimal オブジェクトを作成する場合、
Kernel.#BigDecimal の引数に "Infinity" や "-Infinity" を指定して
ください。(大文字小文字を...
...します)

//emlist[][ruby]{
require "bigdecimal"
BigDecimal("Infinity") # => Infinity
BigDecimal("+Infinity") # => Infinity
BigDecimal("-Infinity") # => -Infinity
//}

==== 非数(Not a Number)

0 / 0 のような未定義の計算を行った場合、非数(Not a Number)を表す値を返
しま...

rubygems/commands/search_command (115.0)

指定された文字列を含む Gem パッケージを全て表示するためのライブラリです。

...tions:
-
i, --[no-]installed Check for installed gem
-
v, --version VERSION Specify version of gem to search
-
d, --[no-]details Display detailed information of gem(s)
-
-[no-]versions Display only gem names
-
a, --all...
...te Options:
-
l, --local 操作をローカルに限定します
-
r, --remote 操作をリモートに限定します
-
b, --both ローカルとリモートの両方の操作を許可します
-
B, --bulk-threshold...
...synchronization (default 1000)
-
-source URL Gem パッケージのリモートリポジトリの URL を指定します
-
-[no-]http-proxy [URL] リモートの操作に HTTP プロクシを使用します
-
u, --[no-]update-sources ローカルソ...

絞り込み条件を変える

rubygems/commands/specification_command (97.0)

指定された Gem パッケージの gemspec の情報を YAML 形式で表示するためのライブラリです。

...GEMFILE] [options]
Options:
-
v, --version VERSION Specify version of gem to examine
-
-platform PLATFORM Specify the platform of gem to specification
-
-all Output specifications for all versions of...
...te Options:
-
l, --local 操作をローカルに限定します
-
r, --remote 操作をリモートに限定します
-
b, --both ローカルとリモートの両方の操作を許可します
-
B, --bulk-threshold...
...synchronization (default 1000)
-
-source URL Gem パッケージのリモートリポジトリの URL を指定します
-
-[no-]http-proxy [URL] リモートの操作に HTTP プロクシを使用します
-
u, --[no-]update-sources ローカルソ...

rubygems/commands/uninstall_command (97.0)

Gem パッケージをアンインストールするためのライブラリです。

...all GEMNAME [GEMNAME ...] [options]
Options:
-
a, --[no-]all Uninstall all matching versions
-
I, --[no-]ignore-dependencies Ignore dependency requirements while
uninstalling
-
x, --[no-]executables Uninstall applicable ex...
...confirmation
-
i, --install-dir DIR Directory to uninstall gem from
-
n, --bindir DIR Directory to remove binaries from
-
v, --version VERSION Specify version of gem to uninstall
-
-platform PLATFORM Specify the platform of gem to unins...
...tall
Common Options:
-
h, --help このコマンドのヘルプを表示します
-
V, --[no-]verbose 表示を詳細にします
-
q, --quiet 静かに実行します
-
-config-file FILE 指定された...
<< 1 2 3 > >>