別のキーワード
種類
- インスタンスメソッド (30)
- 特異メソッド (6)
- 定数 (1)
ライブラリ
- ビルトイン (3)
-
fiddle
/ import (1) - mkmf (11)
- optparse (6)
-
rake
/ testtask (2) - shell (3)
-
shell
/ command-processor (2) -
shell
/ filter (2) -
shell
/ system-command (3) - socket (2)
-
yaml
/ store (2)
クラス
- BasicSocket (2)
- OptionParser (6)
-
Rake
:: TestTask (2) - RubyVM (1)
-
RubyVM
:: InstructionSequence (2) - Shell (3)
-
Shell
:: CommandProcessor (2) -
Shell
:: Filter (2) -
Shell
:: SystemCommand (3) -
YAML
:: Store (2)
モジュール
-
Fiddle
:: Importer (1) - Kernel (11)
キーワード
- bind (1)
-
check
_ signedness (2) -
convertible
_ int (2) - disasm (1)
- disassemble (1)
- new (3)
- notify (6)
- recvmsg (1)
-
recvmsg
_ nonblock (1) -
ruby
_ opts (1) -
ruby
_ opts= (1) - summarize (2)
-
summary
_ indent (1) -
summary
_ indent= (1) -
summary
_ width (1) -
summary
_ width= (1) - system (3)
-
try
_ compile (2) -
try
_ cpp (2) -
try
_ do (2) - xsystem (1)
検索結果
先頭5件
-
RubyVM
:: OPTS -> [String] (63304.0) -
RubyVM のビルドオプションの一覧を返します。
RubyVM のビルドオプションの一覧を返します。 -
Rake
:: TestTask # ruby _ opts -> Array (36604.0) -
テスト実行時に Ruby コマンドに渡されるオプションを返します。
テスト実行時に Ruby コマンドに渡されるオプションを返します。 -
Rake
:: TestTask # ruby _ opts=(options) (36604.0) -
テスト実行時に Ruby コマンドに渡されるオプションをセットします。
テスト実行時に Ruby コマンドに渡されるオプションをセットします。
@param options 配列でオプションを指定します。 -
Shell
# system(command , *opts) -> Shell :: SystemCommand (18922.0) -
command を実行する.
command を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (18922.0) -
command を実行する.
command を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT -
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (18922.0) -
command を実行する.
command を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT -
Kernel
# try _ do(src , command , *opts) -> () (18625.0) -
@param src C プログラムのソースコードを指定します。
@param src C プログラムのソースコードを指定します。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。
@raise RuntimeError 開発環境がインストールされていない場合に発生します。
@see Kernel#xsystem -
Kernel
# try _ do(src , command , *opts) { . . . } -> () (18625.0) -
@param src C プログラムのソースコードを指定します。
@param src C プログラムのソースコードを指定します。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。
@raise RuntimeError 開発環境がインストールされていない場合に発生します。
@see Kernel#xsystem -
Shell
:: SystemCommand # notify(*opts) -> String (18625.0) -
@todo
@todo
@param opts
@see Shell#notify -
Shell
:: SystemCommand # notify(*opts) {|message| . . . } -> String (18625.0) -
@todo
@todo
@param opts
@see Shell#notify -
Kernel
# xsystem(command , opts = nil) -> () (18622.0) -
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー 出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー
出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。
:werror というキーに真を指定すると
@see Kernel.#system -
Kernel
# try _ compile(src , opt = "" , *opts) -> bool (18607.0) -
与えられた C のソースコードがコンパイルできた場合は真を返します。 コンパイルできなかった場合は偽を返します。
与えられた C のソースコードがコンパイルできた場合は真を返します。
コンパイルできなかった場合は偽を返します。
ブロックを与えた場合、そのブロックはコンパイル前に評価されます。
ブロック内でソースコードを変更することができます。
@param src C のソースコードを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。 -
Kernel
# try _ compile(src , opt = "" , *opts) { . . . } -> bool (18607.0) -
与えられた C のソースコードがコンパイルできた場合は真を返します。 コンパイルできなかった場合は偽を返します。
与えられた C のソースコードがコンパイルできた場合は真を返します。
コンパイルできなかった場合は偽を返します。
ブロックを与えた場合、そのブロックはコンパイル前に評価されます。
ブロック内でソースコードを変更することができます。
@param src C のソースコードを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。 -
Kernel
# try _ cpp(src , opt = "" , *opts) -> bool (18607.0) -
C プログラムのソースコード src をプリプロセスします。
C プログラムのソースコード src をプリプロセスします。
$CPPFLAGS, $CFLAGS の値もプリプロセッサにコマンドライン引数
として渡します。
このメソッドはヘッダファイルの存在チェックなどに使用します。
@param src C プログラムのソースコードを指定します。
@param opt プリプロセッサにコマンドライン引数として渡す値を指定します。
@return 問題なくプリプロセスできたら true を返します。
プリプロセスに失敗したら false を返します。
例:
require 'mkmf'
if try_cpp("#in... -
Kernel
# try _ cpp(src , opt = "" , *opts) { . . . } -> bool (18607.0) -
C プログラムのソースコード src をプリプロセスします。
C プログラムのソースコード src をプリプロセスします。
$CPPFLAGS, $CFLAGS の値もプリプロセッサにコマンドライン引数
として渡します。
このメソッドはヘッダファイルの存在チェックなどに使用します。
@param src C プログラムのソースコードを指定します。
@param opt プリプロセッサにコマンドライン引数として渡す値を指定します。
@return 問題なくプリプロセスできたら true を返します。
プリプロセスに失敗したら false を返します。
例:
require 'mkmf'
if try_cpp("#in... -
Shell
# notify(*opts) { . . . } -> () (18604.0) -
@todo
@todo -
Shell
. notify(*opts) {|message| . . . } -> String (18604.0) -
@todo
@todo -
Shell
:: CommandProcessor # notify(*opts) { . . . } -> () (18604.0) -
@todo
@todo -
Shell
:: Filter # notify(*opts) { . . . } -> () (18604.0) -
@todo
@todo -
OptionParser
# summary _ indent -> String (18481.0) -
サマリを表示する時のインデントを文字列で返します。
サマリを表示する時のインデントを文字列で返します。
@return サマリを表示する時のインデントを文字列で返します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summary_indent # => " "
opts.summarize
# => [" -i,... -
OptionParser
# summary _ indent=(indent) (18481.0) -
サマリを表示する時のインデントを文字列で指定します。
サマリを表示する時のインデントを文字列で指定します。
@param indent サマリを表示する時に使われるインデントを文字列で指定します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summary_indent # => " "
opts.summarize
# ... -
OptionParser
# summary _ width -> Integer (18481.0) -
サマリを表示するときの幅を整数で返します。
サマリを表示するときの幅を整数で返します。
@return サマリを表示するときの幅を整数で返します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summary_width # => 32
opts.summarize
# => [" -i, --init\n", " ... -
OptionParser
# summary _ width=(width) (18481.0) -
サマリを表示するときの幅を整数で指定します。
サマリを表示するときの幅を整数で指定します。
@param width サマリを表示するときの幅を整数で指定します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summary_width # => 32
opts.summarize
# => [" -i, --init\n"... -
YAML
:: Store . new(file _ name , thread _ safe = false , yaml _ opts = {}) -> YAML :: Store (9925.0) -
自身を初期化します。
自身を初期化します。
@param file_name 格納先のファイル名。ファイルがない場合は作成します。既
にファイルが存在する場合はその内容を読み込みます。
@param thread_safe 自身をスレッドセーフにして初期化するかどうか。
@param yaml_opts YAML 出力時のオプションを Hash で指定します。
詳しくは Psych.dump を参照してください。 -
YAML
:: Store . new(file _ name , yaml _ opts = {}) -> YAML :: Store (9925.0) -
自身を初期化します。
自身を初期化します。
@param file_name 格納先のファイル名。ファイルがない場合は作成します。既
にファイルが存在する場合はその内容を読み込みます。
@param thread_safe 自身をスレッドセーフにして初期化するかどうか。
@param yaml_opts YAML 出力時のオプションを Hash で指定します。
詳しくは Psych.dump を参照してください。 -
Shell
:: SystemCommand . new(sh , command , *opts) (9322.0) -
@todo
@todo
@param sh
@param command
@param opts -
RubyVM
:: InstructionSequence . disasm(body) -> String (9319.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
引数 body で指定したオブジェクトから作成した
RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::InstructionSequence.disasm(p)
出力:
== disasm: <RubyVM::InstructionSequence:block in <main... -
RubyVM
:: InstructionSequence . disassemble(body) -> String (9319.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
引数 body で指定したオブジェクトから作成した
RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::InstructionSequence.disasm(p)
出力:
== disasm: <RubyVM::InstructionSequence:block in <main... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (727.0) -
サマリを指定された to へと加えていきます。
サマリを指定された to へと加えていきます。
ブロックが与えられた場合、サマリの各行を引数としてブロックを評価します。
この場合、ブロックの中で明示的に to へと加えていかない限り、
to にサマリが加えられることはありません。
@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。
@param width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//emlist[例][ruby]{
requ... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (727.0) -
サマリを指定された to へと加えていきます。
サマリを指定された to へと加えていきます。
ブロックが与えられた場合、サマリの各行を引数としてブロックを評価します。
この場合、ブロックの中で明示的に to へと加えていかない限り、
to にサマリが加えられることはありません。
@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。
@param width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//emlist[例][ruby]{
requ... -
BasicSocket
# recvmsg(maxmesglen=nil , flags=0 , maxcontrollen=nil , opts={}) -> [String , Addrinfo , Integer , *Socket :: AncillaryData] (640.0) -
recvmsg(2) を用いてメッセージを受け取ります。
recvmsg(2) を用いてメッセージを受け取ります。
このメソッドはブロックします。ノンブロッキング方式で通信したい
場合は BasicSocket#recvmsg_nonblock を用います。
maxmesglen, maxcontrollen で受け取るメッセージおよび補助データ
(Socket::AncillaryData)の最大長をバイト単位で指定します。
省略した場合は必要なだけ内部バッファを拡大して
データが切れないようにします。
flags では Socket::MSG_* という名前の定数の biwsise OR を取った
ものを渡します。
opts にはその他... -
BasicSocket
# recvmsg _ nonblock(maxmesglen=nil , flags=0 , maxcontrollen=nil , opts={}) -> [String , Addrinfo , Integer , *Socket :: AncillaryData] (622.0) -
recvmsg(2) を用いてノンブロッキング方式でメッセージを受け取ります。
recvmsg(2) を用いてノンブロッキング方式でメッセージを受け取ります。
ブロッキングの有無以外は BasicSocket#recvmsg と同じです。
詳しくはそちらを参照してください。
@param maxmesglen 受け取るメッセージの最大長
@param flags フラグ
@param maxcontrollen 受け取る補助データの最大長
@param opts ハッシュオプション -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (607.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 (607.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
# convertible _ int(type , headers = nil , opts = nil) (607.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (607.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (376.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
Ruby のブロックを C の関数で wrap し、その関数をモジュールに
インポートします。
これでインポートされた関数はモジュール関数として定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出すことができます。
signature で関数の名前とシネグチャを指定します。例えば
"int compare(void*, void*)" のように指定します。
opts には :stdcall もしくは :cdecl を渡すことができ、
呼出規約を明示することができます。
@return インポートした関数を表す ...