66件ヒット
[1-66件を表示]
(0.021秒)
キーワード
- e2mmap (6)
- getoptlong (12)
- mkmf (12)
-
rdoc
/ parser / ruby (12) -
rubygems
/ commands / environment _ command (12) - tsort (12)
検索結果
-
tsort (19.0)
-
tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
...triple = [outputs, inputs, block]
outputs.each {|f| @dep[f] = [triple]}
@dep[triple] = inputs
end
def build(target)
each_strongly_connected_component_from(target) {|ns|
if ns.length != 1
fs = ns.delete_if {|n| Array === n}
raise TSort::Cyclic.new("cyclic depen......end
end
}
end
def tsort_each_child(node, &block)
@dep[node].each(&block)
end
include TSort
end
def command(arg)
print arg, "\n"
system arg
end
m = Make.new
m.rule(%w[t1]) { command 'date > t1' }
m.rule(%w[t2]) { command 'date > t2' }
m.rule(%w[t3]) { command 'date > t3......分に関するアルゴリズムを使っているからです。
とはいえ strongly_connected_components という正確な名前は長過ぎます。
=== References
R. E. Tarjan,
Depth First Search and Linear Graph Algorithms,
SIAM Journal on Computing, Vol. 1, No. 2, pp. 146-160, June 1972.... -
e2mmap (13.0)
-
例外クラスに特定のエラーメッセージ用フォーマットを関連づけるためのライブラリです。
...def_e2message ExistingExceptionClass, "message..."
def_exception :NewExceptionClass, "message...", StandardError
...
end
class Foo
extend Exception2MessageMapper
include ErrorMod
...
end
Foo.Fail NewExceptionClass, arg...
Foo.Fail ExistingExceptionClass, arg...... -
getoptlong (13.0)
-
getoptlong は、GNU の getopt_long() とまったく同じ方式でコマンド 行オプションの解析を行う Ruby のライブラリです。
...'--max-size', '-m', GetoptLong::REQUIRED_ARGUMENT],
['--quiet', '--silence', '-q', GetoptLong::NO_ARGUMENT],
['--help', GetoptLong::NO_ARGUMENT],
['--version', GetoptLong::NO_ARGUMENT])
getopts モジュールが行っている......ードをあなたのプログラム
に足して下さい。
begin
parser.each_option do |name, arg|
eval "$OPT_#{name.sub(/^--/, '').gsub(/-/, '_').upcase} = '#{arg}'"
end
rescue
exit(1)
end
each_option メソッドは、常にオプション名を「... -
rdoc
/ parser / ruby (13.0) -
Ruby のソースコードを解析するためのサブライブラリです。
...トに含めたい場合、## でコメントを開始します。
##
# This is a meta-programmed method!
add_my_method :meta_method, :arg1, :arg2
RDoc::Parser::Ruby は上記の :meta_method ようにメソッドの定義を行
うような識別子の後に続くトークンをメソッ... -
mkmf (7.0)
-
Ruby の拡張ライブラリのための Makefile を作成するライブラリです。
...す。
このための extconf.rb は以下のように書きます。
require 'mkmf'
dir_config('bar')
if have_header('bar.h') and have_library('bar', 'baz')
create_makefile('foo')
end
拡張ライブラリ foo.so を作成、インストールするには以下のようにします......たは extconf.rb 実行時のオプションのことです。
extconf.rb の作成者は任意のオプションを定義できます。
Kernel#arg_config も参照してください。
また、以下のオプションがデフォルトで利用可能です。
: --with-opt-include=DIR
ヘ......追加します。
: --with-TARGET-include=DIR
ヘッダファイルを探索するディレクトリ DIR を追加します。
extconf.rb の中で dir_config(TARGET)
を実行していればこのオプションを指定できます。
: --with-TARGET-lib=DIR
ライブラリ... -
rubygems
/ commands / environment _ command (7.0) -
RubyGems の環境に関する情報を表示するためのライブラリです。
...RubyGems の環境に関する情報を表示するためのライブラリです。
Usage: gem environment [arg] [options]
Common Options:
-h, --help このコマンドのヘルプを表示します
-V, --[no-]verbose 表示を詳細にしま......バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にします
Arguments:
packageversion gem のバージョンを表示します
gemdir Gem パッケージのインストール先を表示...