キーワード
- DelegateClass (1)
- Digest (1)
-
arg
_ config (1) -
cc
_ command (1) -
check
_ signedness (2) -
check
_ sizeof (2) -
cpp
_ command (1) -
create
_ header (1) -
create
_ makefile (1) -
create
_ tmpsrc (1) - desc (1)
-
dir
_ config (1) -
dummy
_ makefile (1) -
egrep
_ cpp (2) -
enable
_ config (2) - file (1)
-
file
_ create (1) -
find
_ executable (1) - gem (1)
- libpathflag (1)
-
link
_ command (1) -
log
_ src (1) -
merge
_ libs (1) - modified? (1)
- multitask (1)
-
psych
_ y (1) - rule (1)
- task (1)
- time (1)
-
try
_ constant (2) -
with
_ config (2) - y (1)
検索結果
先頭5件
- Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil - Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil - Kernel
# with _ config(config , default = nil) {|config , default| . . . } -> bool | String - Kernel
# arg _ config(config , default) { . . . } -> object | String | true | nil - Kernel
# with _ config(config , default = nil) -> bool | String
-
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (65107.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (65107.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS... -
Kernel
# with _ config(config , default = nil) {|config , default| . . . } -> bool | String (37207.0) -
configure のオプションを検査します。
configure のオプションを検査します。
configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例
require 'mkmf'
if with_config("debug")
$defs... -
Kernel
# arg _ config(config , default) { . . . } -> object | String | true | nil (36907.0) -
configure オプション --config の値を返します。
configure オプション --config の値を返します。
@param config オプションを文字列で指定します。
@param default 引数 config で指定したオプションのデフォルト値を指定します。
@return オプションが指定されてた場合は true を、指定されなかった場合は
nil を返します。
引数 default、あるいはブロックを指定すると、オプションが指定さ
れていない場合に引数 default の値かブロックの評価結果を返します
(両方指定した場合はブロックが優先されます)... -
Kernel
# with _ config(config , default = nil) -> bool | String (36907.0) -
configure のオプションを検査します。
configure のオプションを検査します。
configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例
require 'mkmf'
if with_config("debug")
$defs... -
Kernel
# dir _ config(target , idefault = nil , ldefault = nil) -> [String , String] (36607.0) -
configure オプション --with-TARGET-dir, --with-TARGET-include, --with-TARGET-lib をユーザが extconf.rb に指定できるようにします。
configure オプション
--with-TARGET-dir,
--with-TARGET-include,
--with-TARGET-lib
をユーザが extconf.rb に指定できるようにします。
--with-TARGET-dir オプションは
システム標準ではない、
ヘッダファイルやライブラリがあるディレクトリをまとめて指定するために使います。
ユーザが extconf.rb に --with-TARGET-dir=PATH を指定したときは
$CFLAGS に "-IPATH/include" を、
$LDFLAGS に "-LPATH/lib" を、
それぞれ追加し... -
Kernel
# enable _ config(config , default) -> bool | String (36607.0) -
configure のオプションを検査します。
configure のオプションを検査します。
configure のオプションに --enable-<config> が指定された場合は、真を返し
ます。--disable-<config> が指定された場合は。偽を返します。どちらでもな
い場合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例
require 'mkmf'
if enable_config("debug")
... -
Kernel
# enable _ config(config , default) {|config , default| . . . } -> bool | String (36607.0) -
configure のオプションを検査します。
configure のオプションを検査します。
configure のオプションに --enable-<config> が指定された場合は、真を返し
ます。--disable-<config> が指定された場合は。偽を返します。どちらでもな
い場合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例
require 'mkmf'
if enable_config("debug")
... -
Kernel
# gem(gem _ name , *version _ requirements) -> bool (27907.0) -
$LOAD_PATH に Ruby Gem を追加します。
$LOAD_PATH に Ruby Gem を追加します。
指定された Gem をロードする前にその Gem が必要とする Gem をロードします。
バージョン情報を省略した場合は、最も高いバージョンの Gem をロードします。
指定された Gem やその Gem が必要とする Gem が見つからなかった場合は
Gem::LoadError が発生します。
バージョンの指定方法に関しては Gem::Version を参照してください。
rubygems ライブラリがライブラリバージョンの衝突を検出しない限り、
gem メソッドは全ての require メソッドよりも前に実行されます。
... -
Kernel
# Digest(name) -> object (27607.0) -
"MD5"や"SHA1"などのダイジェストを示す文字列 name を指定し、 対応するダイジェストのクラスを取得します。
...で
Digest::MD5などを直接呼び出すと問題があるときはこのメソッドを使
うか、起動時に使用するライブラリを Kernel.#require してください。
@param name "MD5"や"SHA1"などのダイジェストを示す文字列を指定します。
@return Digest::MD5や... -
Kernel
# egrep _ cpp(pattern , src , opt = "") -> bool (27607.0) -
C プログラムのソースコード src をプリプロセスし、 その結果が正規表現 pattern にマッチするかどうかを判定します。
C プログラムのソースコード src をプリプロセスし、
その結果が正規表現 pattern にマッチするかどうかを判定します。
CPP $CFLAGS opt | egrep pat
を実行し、その結果が正常かどうかを true または false で返します。
このメソッドはヘッダファイルに関数などの宣言があるかどうか
検査するために使用します。
@param pattern 「egrep の」正規表現を文字列で指定します。
Ruby の正規表現ではありません。
@param src C 言語のソースコードを文字列で記述します。
@see ... -
Kernel
# egrep _ cpp(pattern , src , opt = "") { . . . } -> bool (27607.0) -
C プログラムのソースコード src をプリプロセスし、 その結果が正規表現 pattern にマッチするかどうかを判定します。
C プログラムのソースコード src をプリプロセスし、
その結果が正規表現 pattern にマッチするかどうかを判定します。
CPP $CFLAGS opt | egrep pat
を実行し、その結果が正常かどうかを true または false で返します。
このメソッドはヘッダファイルに関数などの宣言があるかどうか
検査するために使用します。
@param pattern 「egrep の」正規表現を文字列で指定します。
Ruby の正規表現ではありません。
@param src C 言語のソースコードを文字列で記述します。
@see ... -
Kernel
# libpathflag(libpath = $ DEFLIBPATH| $ LIBPATH) -> String (27607.0) -
与えられた libpath を -L 付きの文字列に変換して返します。
与えられた libpath を -L 付きの文字列に変換して返します。
@param libpath LIBPATH に指定する値を指定します。 -
Kernel
# merge _ libs(*libs) -> [String] (27607.0) -
@todo 使われてない
@todo 使われてない
@param libs ??? -
Kernel
# message(format , *arg) -> nil (27607.0) -
Kernel.#printf と同じように標準出力にメッセージを出力します。 メッセージ出力後すぐに IO#flush します。
...
Kernel.#printf と同じように標準出力にメッセージを出力します。
メッセージ出力後すぐに IO#flush します。
$VERBOSE が真のときは何もしません。
@param format フォーマット文字列です。
@param arg フォーマットされる引数です。......@see Kernel.#printf... -
Kernel
# DelegateClass(superclass) -> object (27307.0) -
クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。
クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、
そのクラスを返します。
@param superclass 委譲先となるクラス
例:
//emlist{
require 'delegate'
class ExtArray < DelegateClass(Array)
def initialize
super([])
end
end
a = ExtArray.new
p a.class # => ExtArray
a.push 25
p a # => [25]
//} -
Kernel
# log _ src(src) -> () (27307.0) -
与えられた C プログラムのソースコードをログ出力します。
与えられた C プログラムのソースコードをログ出力します。
@param src C プログラムのソースコードを指定します。 -
Kernel
# try _ constant(const , headers = nil , opt = "") -> Integer | nil (18907.0) -
定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。
...定数 const がシステムに存在するかどうか検査します。
Kernel#have_const を使ってください。
@param const C 言語の定数名を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを... -
Kernel
# try _ constant(const , headers = nil , opt = "") { . . . } -> Integer | nil (18907.0) -
定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。
...定数 const がシステムに存在するかどうか検査します。
Kernel#have_const を使ってください。
@param const C 言語の定数名を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを... -
Kernel
# cc _ command(opt = "") -> String (18607.0) -
実際にコンパイルする際に使用するコマンドを返します。
実際にコンパイルする際に使用するコマンドを返します。
@param opt コンパイラに与える追加のコマンドライン引数を指定します。
@see RbConfig.expand -
Kernel
# cpp _ command(outfile , opt = "") -> String (18607.0) -
実際にプリプロセッサを実行する際に使用するコマンドを返します。
実際にプリプロセッサを実行する際に使用するコマンドを返します。
@param outfile 出力ファイルの名前を指定します。
@param opt プリプロセッサに与える追加のコマンドライン引数を指定します。
@see RbConfig.expand -
Kernel
# find _ executable(bin , path = nil) -> String | nil (18607.0) -
パス path から実行ファイル bin を探します。
パス path から実行ファイル bin を探します。
実行ファイルが見つかった場合は、そのフルパスを返します。
実行ファイルが見つからなかった場合は、nilを返します。
このメソッドは Makefile を変更しません。
@param bin 実行ファイルの名前を指定します。
@param path パスを指定します。デフォルトは環境変数 PATH です。
環境変数 PATH が定義されていない場合は /usr/local/bin,
/usr/ucb, /usr/bin, /bin を使います。 -
Kernel
# link _ command(ldflags , opt = "" , libpath = $ DEFLIBPATH| $ LIBPATH) -> String (18607.0) -
実際にリンクする際に使用するコマンドを返します。
実際にリンクする際に使用するコマンドを返します。
@param ldflags LDFLAGS に追加する値を指定します。
@param opt LIBS に追加する値を指定します。
@param libpath LIBPATH に指定する値を指定します。
@see RbConfig.expand -
Kernel
# check _ sizeof(type , headers = nil) -> Integer | nil (9907.0) -
与えられた型のサイズを返します。
与えられた型のサイズを返します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。 -
Kernel
# check _ sizeof(type , headers = nil) { . . . } -> Integer | nil (9907.0) -
与えられた型のサイズを返します。
与えられた型のサイズを返します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。 -
Kernel
# create _ header(header = "extconf . h") -> String (9607.0) -
Kernel#have_func, Kernel#have_header などの検査結果を元に、 ヘッダファイルを生成します。
...
Kernel#have_func, Kernel#have_header などの検査結果を元に、
ヘッダファイルを生成します。
このメソッドは extconf.rb の最後で呼び出すようにしてください。
@param header ヘッダファイルの名前を指定します。
@return ヘッダファイ... -
Kernel
# create _ makefile(target , srcprefix = nil) -> true (9607.0) -
@todo
...@todo
Kernel#have_library などの各種検査の結果を元に、拡張ライブラリを
ビルドするための Makefile を生成します。
extconf.rb は普通このメソッドの呼び出しで終ります。
@param target ターゲットとなる拡張ライブラリの名前を指... -
Kernel
# create _ tmpsrc(src) -> String (9607.0) -
与えられた C プログラムのソースコードを一時ファイルに出力して与えられたソースコードを返します。
与えられた C プログラムのソースコードを一時ファイルに出力して与えられたソースコードを返します。
@param src C プログラムのソースコードを指定します。 -
Kernel
# desc(description) -> String (9607.0) -
直後の Rake タスクの説明を登録します。
直後の Rake タスクの説明を登録します。
@param description 直後のタスクの説明を指定します。
例:
desc "Run the Unit Tests"
task :test => [:build] do
runtests
end -
Kernel
# dummy _ makefile(srcdir) -> String (9607.0) -
ダミーの Makefile を作成します。
ダミーの Makefile を作成します。
@param srcdir ソースディレクトリを指定します。 -
Kernel
# file _ create(*args) { . . . } -> Rake :: FileCreationTask (9607.0) -
ファイルを作成するタスクを定義します。
...ファイルを作成するタスクを定義します。
主に Kernel.#directory を定義するために使用します。... -
Kernel
# modified?(target , times) -> Time | nil (9607.0) -
target が times の全ての要素よりも新しい場合は target の更新時刻を返します。 そうでない場合は nil を返します。target が存在しない場合も nil を返します。
target が times の全ての要素よりも新しい場合は target の更新時刻を返します。
そうでない場合は nil を返します。target が存在しない場合も nil を返します。
@param target 対象のファイル名を指定します。
@param times Time の配列か Time を一つ指定します。 -
Kernel
# psych _ y(*objects) -> String (9607.0) -
objects を YAML document に変換します。
objects を YAML document に変換します。
このメソッドは irb 上でのみ定義されます。
syck に y メソッドがあるため、
psych_y が別名として定義されています。将来的に
syck が廃止された場合 psych_y は廃止
される予定であるため、特別の事情がない限り y を用いてください。
@param objects YAML document に変換する Ruby のオブジェクト -
Kernel
# y(*objects) -> String (9607.0) -
objects を YAML document に変換します。
objects を YAML document に変換します。
このメソッドは irb 上でのみ定義されます。
syck に y メソッドがあるため、
psych_y が別名として定義されています。将来的に
syck が廃止された場合 psych_y は廃止
される予定であるため、特別の事情がない限り y を用いてください。
@param objects YAML document に変換する Ruby のオブジェクト -
Kernel
# file(*args) { . . . } -> Rake :: FileTask (9307.0) -
ファイルタスクを定義します。
ファイルタスクを定義します。
@param args ファイル名と依存ファイル名を指定します。
例:
file "config.cfg" => ["config.template"] do
open("config.cfg", "w") do |outfile|
open("config.template") do |infile|
while line = infile.gets
outfile.puts line
end
end
end
end
@see Rake:... -
Kernel
# multitask(args) { . . . } -> Rake :: MultiTask (9307.0) -
事前タスクを並列実行するタスクを定義します。
事前タスクを並列実行するタスクを定義します。
与えられた事前タスクを実行する順序は不定です。
例:
multitask :deploy => [:deploy_gem, :deploy_rdoc] -
Kernel
# rule(*args) {|t| . . . } -> Rake :: Task (9307.0) -
自動的に作成するタスクのためのルールを定義します。
自動的に作成するタスクのためのルールを定義します。
@param args ルールに与えるパラメータを指定します。
例:
rule '.o' => '.c' do |t|
sh %{cc -o #{t.name} #{t.source}}
end -
Kernel
# task(*args) { . . . } -> Rake :: Task (9307.0) -
Rake タスクを定義します。
Rake タスクを定義します。
@param args タスク名と依存タスクを指定します。
例:
task :clobber => [:clean] do
rm_rf "html"
end
@see Rake::Task.define_task -
Kernel
# time(msg , width = 25) { . . . } -> object (9307.0) -
与えられたブロックの実行時間を計測して表示します。
与えられたブロックの実行時間を計測して表示します。
@param msg 表示するメッセージを指定します。
@param width 表示する幅を指定します。
@return ブロックの実行結果を返します。