るりまサーチ

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

別のキーワード

  1. objectspace each_object
  2. _builtin each_object
  3. object send
  4. object to_enum
  5. object enum_for

キーワード

検索結果

debug (43.0)

Ruby デバッガです。Ruby スクリプトのソースコードデバッグに使用します。

...ithub.com/ruby/elisp にあるので、活用してください。

=== 使い方

$ ruby -rdebug foo.rb

または、Emacs から

M-x load-library rubydb3x.el
M-x rubydb

=== デバッグコマンド

以下は、デバッガで使用できるコマンド名とその用法の一覧です...
...があります。

ここに挙げたもの以外を入力した場合、その入力を ruby の式として評価します。

: break
: break [<file>:]<position>|<class>:<method>
ブレークポイントを設定します。引数を省略した場合設定したブレークポ
イント...
...i[nstance] <object>
: var c[onst] <object>
それぞれ、グローバル変数、ローカル変数、オブジェクト<object>の
インスタンス変数、<object>の定数を表示します。

このコマンドの省略形は v です。

: method i[nstance] <object>
: method <c...

irb (31.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...コマンドライン編集や履歴の機能が使えるようになります。

=== irb のコマンドラインオプション

irb [options] file_name opts
options:
-f ~/.irbrc を読み込まない
-m bc モード (分数と行列の計算ができる)
-...
...= false
IRB.conf[:BACK_TRACE_LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:I...
...# サブ irb を起動
irb#1(main):001:0> x # x を表示
NameError: undefined local variable or method `x' for main:Object
from (irb#1):1:in `Kernel#binding'

起動時のインタプリタでローカル変数 x を定義しましたが、
「irb」でサブ irb...
...オプション

irb [options] file_name opts
options:
-f ~/.irbrc を読み込まない
-d $DEBUG を true にする (ruby -d と同じ)
-w ruby -w と同じ
-W[level=2] ruby -W と同じ
-r library ruby -r と同じ
-I...

net/smtp (31.0)

メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。

...ポート番号です。
ブロックを使うと File.open と同じように終端処理を自動的にやってくれる
のでおすすめです。

require 'net/smtp'
Net::SMTP.start( 'smtp.example.com', 25 ) {|smtp|
# use smtp object only in this block
}

smtp-server.example.com は...
...=== セッションを終了する

メールを送ったら Net::SMTP#finish を呼んで
セッションを終了しなければいけません。
File
のように GC 時に勝手に close されることもありません。

# using SMTP#finish
require 'net/smtp'
smtp = Net::SMTP.start('s...
...ブジェクトからならなんでも送ることができます。
以下は File オブジェクトから直接送信する例です。

require 'net/smtp'

Net::SMTP.start('your.smtp.server', 25) {|smtp|
File
.open('Mail/draft/1') {|f|
smtp.send_message f, 'from@example.com', 'to@e...

drb/extservm (19.0)

DRb::ExtServManager を定義しているライブラリ。

...れた
時に起動されます。また、stop.rbを用いて



server.rb:
require 'drb/drb'
require 'drb/extservm'

Dir.chdir(File.dirname(__FILE__))
# サービスを起動するコマンドを指定する
# コマンドは文字列配列、もしくは文字列で指定できる...
...ice1)
DRb::ExtServManager.command["No2"] = %w(ruby service.rb service2)

# ExtServManager オブジェクトを生成して
# drb の front object に指定する
s = DRb::ExtServManager.new
DRb.start_service("druby://localhost:10234", s)

# drb のプロセスの終了を待つ
DR...
...# 終了するため、以下の行が実行される
puts "Stop #{ARGV[0]}"

client.rb:
require 'drb/drb'

DRb.start_service
s = DRbObject.new_with_uri("druby://localhost:10234")

# No1 と名付けられたサービスを呼び出す
service1 = s.service("No1").front
p service...

rdoc (19.0)

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

...例えば '--extension cgi=rb' とすれば、RDoc は ".cgi" で
終わるファイルを Ruby のソースとして取り扱います。

: --fileboxes

--diagram を指定した場合生成された図において、クラスがどのソースファ
イルで定義されているかを四...
...レクトリにすでにファイルが存在すれば、
そのファイルを上書きせずに、マージするようにします。

: --one-file

すべての出力を一つのファイルに書きだします。

: --output dir, --op dir

出力先のディレクトリを dir に設定...
...or other pages not associated with
a class live. Set this when you don't store such files at your
project root. NOTE: Do not use the same file name in the page dir
and the root of your project

: --copy-files path

path で指定したファイルかディレクトリを出力先のディ...

絞り込み条件を変える