406件ヒット
[201-300件を表示]
(0.047秒)
ライブラリ
- ビルトイン (63)
- drb (44)
- optparse (44)
-
rake
/ testtask (11) -
rubygems
/ user _ interaction (11) - shell (66)
-
shell
/ command-processor (30) -
shell
/ filter (30)
クラス
-
DRb
:: DRbServer (33) -
Gem
:: StreamUI :: VerboseProgressReporter (11) - OptionParser (44)
- Proc (14)
- Shell (66)
-
Shell
:: CommandProcessor (30) -
Shell
:: Filter (30)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
MAJOR
_ VERSION (11) -
MINOR
_ VERSION (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - TestTask (11)
- [] (18)
- cd (6)
- foreach (18)
- help (11)
-
install
_ system _ commands (6) - irb (11)
- lambda (13)
- mkdir (18)
- popd (6)
- popdir (6)
- proc (14)
- pushd (6)
- pushdir (6)
- rake (11)
- rdoc (11)
-
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) - rubygems (11)
-
start
_ service (11) - system (18)
- test (18)
-
test
/ unit (1) -
to
_ s (11) - verbose= (11)
検索結果
先頭5件
-
DRb
. # start _ service(uri=nil , front=nil , config _ or _ acl=nil) -> () (18.0) -
dRuby のサービス(サーバ)を起動します。
...別子とオブジェクトを相互に変換するためのオブジェクト。
デフォルトは DRb::DRbIdConv のインスタンス。
: :verbose
真を指定すると失敗したdRuby経由のメソッドのログを
$stdout に出力します。デフォルトは false。
: :tcp_acl......fault_argc_limit
* DRb::DRbServer.default_id_conv
* DRb::DRbServer.default_load_limit
* DRb::DRbServer.default_safe_level
* DRb::DRbServer.verbose=
config に Hash以外を渡すと、ACL(Access Control List)として取り扱われます。
起動したサーバはただちに接続を待......ビスを bind する URI の文字列
@param front フロントオブジェクト
@param config オプション設定の Hash
@raise DRb::DRbBadURI URI の schema が不正(サポートされていないものである)場合に
発生します
@see DRb.#primary_server, DRb::DRbServer.new... -
OptionParser
# banner -> String (18.0) -
サマリの最初に表示される文字列を返します。
...します。
//emlist[例][ruby]{
require "optparse"
options = {}
opts = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
options[:verbose] = v
end
end
p opts.banner # => "Usage: example.rb [options]"
//}... -
OptionParser
# banner=(heading) (18.0) -
サマリの最初に表示される文字列を指定します。
...][ruby]{
require "optparse"
options = {}
opts = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]" # => "Usage: example.rb [options]"
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
options[:verbose] = v
end
end
opts.banner # => "Usage: example.rb [options]"... -
Rake
:: TestTask (18.0) -
ユニットテストを実行するためのタスクを作成するクラスです。
...ットテストを実行するためのタスクを作成するクラスです。
例:
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/test*.rb']
t.verbose = true
end
以下に test ターゲットの使用例を示します。
例:
rake test......# run tests normally
rake test TEST=just_one_file.rb # run just one test file.
rake test TESTOPTS="-v" # run in verbose mode
rake test TESTOPTS="--runner=fox" # use the fox test runner... -
irb (18.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...ruby -I と同じ
-U ruby -U と同じ
-E enc ruby -E と同じ
--verbose これから実行する行を表示する
--noverbose これから実行する行を表示しない (デフォルト)
--echo 実行結果を表示......= false
IRB.conf[:SAVE_HISTORY] = nil
IRB.conf[:USE_LOADER] = true
IRB.conf[:USE_READLINE] = nil
IRB.conf[:USE_TRACER] = true
IRB.conf[:VERBOSE] = true
それぞれの設定値の詳細については、IRB::Context を参照してください。
====[a:customize_prompt] プロンプト......"
irb#2(Foo):007:1> end
nil
irb#2(Foo):010:0> Foo.instance_methods
["bar", "foo"]
irb#2(Foo):011:0> fg 0
nil
irb(main):007:0> f = Foo.new
#<Foo:0x4010af3c>
irb(main):008:0> irb f # Fooのインスタンスでirbを......= false
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:USE_LOADER] = true
IRB.conf[:USE_READLINE] = nil
IRB.conf[:USE_TRACER] = true
IRB.conf[:VERBOSE] = true
それぞれの設定値の詳細については、IRB::Context を参照してください。
====[a:customize_prompt] プロンプト... -
rake (18.0)
-
Rake というコマンドラインツールを扱うライブラリです。
...パターンは省略可能です。
-t, --trace 全てのバックトレースを表示します。
-v, --verbose 標準出力にログメッセージを表示します (デフォルト)。
-V, --version このプログ......タスクを定義
task :default => [:test]
1.upto(8) do |n|
Rake::TestTask.new("test_step#{n}") do |t|
t.libs << "step#{n}"
t.test_files = FileList["step#{n}/test_*.rb"]
t.verbose = false
end
end
desc 'execute all test'
task 'test_all' => (1..8).to_a.map{|n... -
test
/ unit (18.0) -
ユニットテストを行うためのライブラリです。
...が必ず呼ばれます。
require 'test/unit'
require 'foo'
class TC_Foo < Test::Unit::TestCase
def setup
@obj = Foo.new
end
# def teardown
# end
def test_foo
assert_equal("foo", @obj.foo)
end
def test_bar
assert_equ......tions:
-h, --help Display this help.
-s, --seed SEED Sets random seed
-v, --verbose Verbose. Show progress processing files.
-n, --name PATTERN Filter test names on pattern.
--jobs-status [TYPE]... -
Marshal
:: MAJOR _ VERSION -> Integer (12.0) -
Marshal.#dump が出力するデータフォーマットのバージョン番号です。
...読み込み可能ですが、
$VERBOSE = true のときには警告メッセージが出力されます
マーシャルされたデータのバージョン番号は以下のようにして取得するこ
とができます。
//emlist[例][ruby]{
obj = Object.new
major, minor = Marshal.dump(obj).... -
Marshal
:: MINOR _ VERSION -> Integer (12.0) -
Marshal.#dump が出力するデータフォーマットのバージョン番号です。
...読み込み可能ですが、
$VERBOSE = true のときには警告メッセージが出力されます
マーシャルされたデータのバージョン番号は以下のようにして取得するこ
とができます。
//emlist[例][ruby]{
obj = Object.new
major, minor = Marshal.dump(obj).... -
Shell
# [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (12.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...へのパスを指定します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"]... -
Shell
# foreach(path = nil , &block) -> () (12.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
...なら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
}... -
Shell
# mkdir(*path) -> Array (12.0) -
Dir.mkdirと同じです。 (複数可)
...ram path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end...