ライブラリ
-
irb
/ cmd / help (1) -
irb
/ cmd / load (3) -
irb
/ cmd / subirb (1) -
irb
/ ext / use-loader (2) -
irb
/ extend-command (3) - mkmf (5)
- optparse (12)
- rake (1)
-
rubygems
/ command (6) -
rubygems
/ command _ manager (4) -
rubygems
/ commands / build _ command (5) -
rubygems
/ commands / dependency _ command (1) -
rubygems
/ commands / lock _ command (2) -
rubygems
/ commands / unpack _ command (1) -
rubygems
/ commands / update _ command (1) -
rubygems
/ version _ option (1) - shell (7)
-
shell
/ builtin-command (2) -
shell
/ command-processor (60) -
shell
/ filter (16) -
shell
/ process-controller (4) -
shell
/ system-command (11)
クラス
-
Gem
:: Command (6) -
Gem
:: CommandManager (4) -
Gem
:: Commands :: BuildCommand (5) -
Gem
:: Commands :: DependencyCommand (1) -
Gem
:: Commands :: LockCommand (2) -
Gem
:: Commands :: UnpackCommand (1) -
Gem
:: Commands :: UpdateCommand (1) -
IRB
:: ExtendCommand :: Help (1) -
IRB
:: ExtendCommand :: Kill (1) -
IRB
:: ExtendCommand :: Load (1) -
IRB
:: ExtendCommand :: Require (1) -
IRB
:: ExtendCommand :: Source (1) - OptionParser (12)
- Shell (7)
-
Shell
:: BuiltInCommand (2) -
Shell
:: CommandProcessor (60) -
Shell
:: Filter (16) -
Shell
:: ProcessController (4) -
Shell
:: SystemCommand (11)
モジュール
- FileUtils (1)
-
Gem
:: VersionOption (1) -
IRB
:: ExtendCommandBundle (5) - Kernel (5)
キーワード
- < (1)
- > (1)
- >> (1)
- [] (4)
- active? (2)
-
add
_ option (1) -
add
_ platform _ option (1) - append (1)
- arguments (1)
- atime (1)
- basename (1)
- begins? (1)
- blockdev? (1)
- cat (3)
-
cc
_ command (1) - chardev? (1)
-
check
_ point (1) - chmod (1)
- chown (1)
- complain (1)
-
cpp
_ command (1) - ctime (1)
-
defaults
_ str (1) - delete (1)
- directory? (1)
- dirname (1)
- each (1)
- echo (3)
- executable? (1)
-
executable
_ real? (1) - execute (6)
- exist? (1)
- exists? (1)
- file? (1)
-
find
_ command (1) -
find
_ command _ possibilities (1) -
find
_ system _ command (3) -
finish
_ all _ jobs (1) - foreach (1)
- ftype (1)
-
get
_ one _ optional _ argument (1) -
get
_ path (1) - glob (3)
- grpowned? (1)
- identical? (1)
- input= (1)
-
install
_ alias _ method (1) -
irb
_ context (1) -
irb
_ exit (1) -
irb
_ load (1) -
irb
_ require (1) - join (1)
- kill (1)
-
kill
_ job (1) - link (1)
-
link
_ command (1) -
load
_ gemspecs (1) - lstat (1)
- mkdir (1)
- mtime (1)
- name (1)
- notify (3)
- on (12)
- open (1)
- out (1)
- owned? (1)
- pipe? (1)
-
print
_ dependencies (1) - readable? (1)
-
readable
_ real? (1) - readlink (1)
-
register
_ command (1) - rm (1)
- rmdir (1)
- setgid? (1)
- setuid? (1)
- sfork (1)
- sh (1)
-
show
_ lookup _ failure (1) - size (1)
- size? (1)
- socket? (1)
-
spec
_ path (1) - split (1)
-
start
_ import (1) -
start
_ job (1) - stat (1)
- sticky? (1)
- symlink (1)
- symlink? (1)
- system (1)
- tee (3)
- terminate (1)
-
terminate
_ job (1) - test (3)
-
to
_ a (1) -
to
_ s (1) - transact (1)
- unlink (1)
- usage (1)
- utime (1)
- wait? (2)
-
which
_ to _ update (1) -
world
_ writable? (1) - writable? (1)
-
writable
_ real? (1) - xpopen (1)
- xsystem (1)
- yaml? (1)
- zero? (1)
- | (1)
検索結果
先頭5件
- Shell
:: SystemCommand # command -> String - Gem
:: CommandManager # find _ command _ possibilities(command _ name) -> Array - IRB
:: ExtendCommandBundle # irb _ require(*opts , &b) -> bool - Kernel
# link _ command(ldflags , opt = "" , libpath = $ DEFLIBPATH| $ LIBPATH) -> String - Gem
:: VersionOption # add _ platform _ option(task = command , *wrap)
-
Shell
:: SystemCommand # command -> String (72607.0) -
@todo
@todo
コマンド名を返します。 -
Gem
:: CommandManager # find _ command _ possibilities(command _ name) -> Array (64228.0) -
登録されているコマンドでマッチする可能性のあるものを返します。
登録されているコマンドでマッチする可能性のあるものを返します。
@param command_name コマンド名を文字列で指定します。 -
IRB
:: ExtendCommandBundle # irb _ require(*opts , &b) -> bool (63904.0) -
現在の irb に関する IRB::Context に対して irb_require コマンドを 実行します。
現在の irb に関する IRB::Context に対して irb_require コマンドを
実行します。
@see IRB::ExtendCommand::Require#execute -
Kernel
# link _ command(ldflags , opt = "" , libpath = $ DEFLIBPATH| $ LIBPATH) -> String (56107.0) -
実際にリンクする際に使用するコマンドを返します。
実際にリンクする際に使用するコマンドを返します。
@param ldflags LDFLAGS に追加する値を指定します。
@param opt LIBS に追加する値を指定します。
@param libpath LIBPATH に指定する値を指定します。
@see RbConfig.expand -
Gem
:: VersionOption # add _ platform _ option(task = command , *wrap) (54925.0) -
option parser に対して --platform オプションを追加します。
option parser に対して --platform オプションを追加します。
@param task コマンド名を指定します。デフォルト値はインクルードされる側のクラスで指定されます。
@param wrap Gem::Command#add_option に渡すその他のオプションを指定します。 -
Shell
:: ProcessController # kill _ job(signal , command) -> Integer (54925.0) -
指定されたコマンドにシグナルを送ります。
指定されたコマンドにシグナルを送ります。
@param signal シグナルを整数かその名前の文字列で指定します。
負の値を持つシグナル(あるいはシグナル名の前に-)を指定すると、
プロセスではなくプロセスグループにシグナルを送ります。
@param command コマンドを指定します。
@see Process.#kill -
Shell
:: CommandProcessor # find _ system _ command(command) (54910.0) -
@todo
@todo -
Gem
:: Commands :: LockCommand # complain(message) -> () (54604.0) -
指定されたメッセージを表示します。--strict が有効な場合は例外が発生します。
指定されたメッセージを表示します。--strict が有効な場合は例外が発生します。
@param message 表示するメッセージを指定します。
@raise Gem::Exception コマンドラインオプションに --strict が指定されている場合に発生します。 -
IRB
:: ExtendCommandBundle # irb _ load(*opts , &b) -> nil (54604.0) -
現在の irb に関する IRB::Context に対して irb_load コマンドを実行 します。
現在の irb に関する IRB::Context に対して irb_load コマンドを実行
します。
@see IRB::ExtendCommand::Load#execute -
Shell
:: SystemCommand # kill(signal) -> Integer (54604.0) -
自身のプロセスにシグナルを送ります。
自身のプロセスにシグナルを送ります。
@param signal シグナルを整数かその名前の文字列で指定します。
負の値を持つシグナル(あるいはシグナル名の前に-)を指定すると、
プロセスではなくプロセスグループにシグナルを送ります。
@see Process.#kill -
Gem
:: CommandManager # find _ command(command _ name) -> Gem :: Command | nil (46549.0) -
登録されているコマンドからマッチしたものを返します。
登録されているコマンドからマッチしたものを返します。
@param command_name コマンド名を文字列で指定します。
@return Gem::Command のサブクラスのインスタンスを返します。
@raise RuntimeError マッチする可能性のあるコマンドが複数ある場合に発生します。
また、マッチするコマンドが無かった場合にも発生します。 -
Gem
:: CommandManager # register _ command(command _ name) -> false (46228.0) -
コマンドを自身に登録します。
コマンドを自身に登録します。
@param command_name コマンド名をシンボルで指定します。 -
Shell
:: CommandProcessor # file?(file) -> bool (46204.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#file? -
Shell
# find _ system _ command(command) (45910.0) -
@todo
@todo -
Shell
:: Filter # find _ system _ command(command) (45910.0) -
@todo
@todo -
Gem
:: Command # show _ lookup _ failure(gem _ name , version , errors = nil) -> () (45904.0) -
Gem が見つからなかった場合、メッセージを表示するために使用するメソッドです。
Gem が見つからなかった場合、メッセージを表示するために使用するメソッドです。
@param gem_name Gem の名前を指定します。
@param version Gem のバージョンを指定します。
@param errors Gem が見つからなかった理由を表すオブジェクトを格納した配列を指定します。 -
Shell
:: CommandProcessor # readlink(path) -> String (45904.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
:: CommandProcessor # writable?(file) -> bool (45904.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable? -
Shell
:: CommandProcessor # writable _ real?(file) -> bool (45904.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable_real? -
Gem
:: Command # get _ one _ optional _ argument -> String (45604.0) -
コマンドラインからオプショナルな引数を取得して返します。
コマンドラインからオプショナルな引数を取得して返します。
@return 一つ以上、指定した場合は最初の値を返します。一つも指定していない場合は nil を返します。 -
Gem
:: Command # handle _ options(args) (45604.0) -
与えられた引数のリストをパースして結果を記録します。
与えられた引数のリストをパースして結果を記録します。
@param args 引数のリストを指定します。 -
Gem
:: Commands :: BuildCommand # load _ gemspecs(filename) -> Array (45604.0) -
gemspec ファイルをロードします。
gemspec ファイルをロードします。
@param filename ファイル名を指定します。 -
Gem
:: Commands :: BuildCommand # yaml?(filename) -> bool (45604.0) -
与えられたファイル名を持つファイルが yaml ファイルである場合に真を返します。
与えられたファイル名を持つファイルが yaml ファイルである場合に真を返します。
@param filename ファイル名を指定します。 -
IRB
:: ExtendCommandBundle # install _ alias _ method(to , from , override = NO _ OVERRIDE) (45604.0) -
メソッドのエイリアスを定義します。ライブラリ内部で使用します。
メソッドのエイリアスを定義します。ライブラリ内部で使用します。
@param to 新しいメソッド名を Symbol か文字列で指定します。
@param from 元のメソッド名を Symbol か文字列で指定します。
@param override 新しいメソッド名が定義済みであった場合にそのメソッドを
上書きするかどうかを
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_... -
IRB
:: ExtendCommandBundle # irb _ context -> IRB :: Context (45604.0) -
現在の irb に関する IRB::Context を返します。
現在の irb に関する IRB::Context を返します。 -
Shell
:: CommandProcessor # finish _ all _ jobs (45604.0) -
@todo
@todo -
Shell
:: CommandProcessor # identical? (45604.0) -
@todo
@todo -
Shell
:: CommandProcessor # link(old , new) -> 0 (45604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
:: CommandProcessor # split(pathname) -> [String] (45604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split -
Shell
:: CommandProcessor # symlink(old , new) -> 0 (45604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
:: CommandProcessor # symlink?(file) -> bool (45604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#symlink? -
Shell
:: CommandProcessor # unlink(path) -> self (45604.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink -
Shell
:: CommandProcessor # world _ writable? (45604.0) -
@todo
@todo -
IRB
:: ExtendCommandBundle # irb _ exit(ret = 0) -> object (45304.0) -
irb を終了します。ret で指定したオブジェクトを返します。
irb を終了します。ret で指定したオブジェクトを返します。
@param ret 戻り値を指定します。
ユーザが直接使用するものではありません。 -
Shell
:: CommandProcessor # utime(atime , mtime , *filename) -> Integer (37204.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。
@see File.utime -
Gem
:: Commands :: DependencyCommand # print _ dependencies(spec , level = 0) -> String (36904.0) -
依存関係を表す文字列を返します。
依存関係を表す文字列を返します。
@param spec Gem::Specification のインスタンスを指定します。
@param level 依存関係の深さを指定します。 -
Shell
:: CommandProcessor # atime(filename) -> Time (36904.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime -
Shell
:: CommandProcessor # ctime(filename) -> Time (36904.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime -
Shell
:: CommandProcessor # mtime(filename) -> Time (36904.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.mtime -
Shell
:: ProcessController # terminate _ job(command) (36625.0) -
指定されたコマンドを終了します。
指定されたコマンドを終了します。
@param command コマンドを指定します。 -
Gem
:: Commands :: UpdateCommand # which _ to _ update(highest _ installed _ gems , gem _ names) -> Array (36604.0) -
更新が必要な Gem のリストを返します。
更新が必要な Gem のリストを返します。 -
Shell
:: BuiltInCommand # wait? -> false (36604.0) -
@todo
@todo -
Shell
:: CommandProcessor # directory?(file) -> bool (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#directory? -
Shell
:: CommandProcessor # dirname(filename) -> String (36604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
:: CommandProcessor # exist?(file) -> bool (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
:: CommandProcessor # exists?(file) -> bool (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
:: CommandProcessor # join(*item) -> String (36604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
:: CommandProcessor # pipe?(file) -> bool (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#pipe? -
Shell
:: CommandProcessor # setgid?(file) -> bool (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid? -
Shell
:: CommandProcessor # setuid?(file) -> bool (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid? -
Shell
:: CommandProcessor # size(file) -> Integer (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size? -
Shell
:: CommandProcessor # size?(file) -> Integer | nil (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size? -
Shell
:: CommandProcessor # sticky?(file) -> bool (36604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#sticky? -
Shell
:: SystemCommand # active? -> bool (36604.0) -
@todo
@todo -
Shell
:: SystemCommand # input=(inp) (36604.0) -
@todo
@todo -
Shell
:: SystemCommand # wait? -> bool (36604.0) -
@todo
@todo -
Gem
:: Commands :: BuildCommand # arguments -> String (36304.0) -
引数の説明を表す文字列を返します。
引数の説明を表す文字列を返します。 -
Gem
:: Commands :: BuildCommand # usage -> String (36304.0) -
使用方法を表す文字列を返します。
使用方法を表す文字列を返します。 -
Shell
:: BuiltInCommand # active? -> true (36304.0) -
@todo
@todo -
Shell
:: CommandProcessor # check _ point (36304.0) -
@todo
@todo -
Shell
:: CommandProcessor # mkdir(*path) -> Array (36304.0) -
Dir.mkdirと同じです。 (複数可)
Dir.mkdirと同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end -
Shell
:: CommandProcessor # notify(*opts) { . . . } -> () (36304.0) -
@todo
@todo -
Shell
:: CommandProcessor # rmdir(*path) -> () (36304.0) -
Dir.rmdirと同じです。 (複数可)
Dir.rmdirと同じです。 (複数可)
@param path 削除するディレクトリ名を文字列で指定します。 -
Shell
:: SystemCommand # notify(*opts) -> String (36304.0) -
@todo
@todo
@param opts
@see Shell#notify -
Shell
:: SystemCommand # notify(*opts) {|message| . . . } -> String (36304.0) -
@todo
@todo
@param opts
@see Shell#notify -
Shell
:: SystemCommand # start _ import -> () (36304.0) -
@todo
@todo -
Shell
:: SystemCommand # terminate -> () (36304.0) -
@todo
@todo -
Gem
:: Commands :: BuildCommand # execute -> () (36004.0) -
コマンドを実行します。
コマンドを実行します。 -
IRB
:: ExtendCommand :: Load # execute(file _ name , priv = nil) -> nil (28204.0) -
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実 行します。
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実
行します。
Kernel.#load と異なり、path の内容を irb で一行ずつタイプしたかの
ように、irb 上で一行ずつ評価されます。
@param file_name ファイル名を文字列で指定します。
@param priv 真を指定した場合は実行は内部的に生成される無名モジュール上
で行われ、グローバルな名前空間を汚染しません。
@raise LoadError 読み込みに失敗した場合に発生します。 -
Kernel
# cpp _ command(outfile , opt = "") -> String (27907.0) -
実際にプリプロセッサを実行する際に使用するコマンドを返します。
実際にプリプロセッサを実行する際に使用するコマンドを返します。
@param outfile 出力ファイルの名前を指定します。
@param opt プリプロセッサに与える追加のコマンドライン引数を指定します。
@see RbConfig.expand -
Gem
:: Command # add _ option(*opts) {|value , options| . . . } (27904.0) -
コマンドに対するコマンドラインオプションとハンドラを追加します。
コマンドに対するコマンドラインオプションとハンドラを追加します。
ブロックには、コマンドライン引数の値とそのオプションが渡されます。
オプションはハッシュになっています。
@param opts オプションを指定します。
@see OptionParser#make_switch -
Shell
:: CommandProcessor # delete(*filename) -> Integer (27904.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor # executable?(file) -> bool (27904.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable? -
Shell
:: CommandProcessor # executable _ real?(file) -> bool (27904.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable_real? -
Shell
:: CommandProcessor # lstat(filename) -> File :: Stat (27904.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.lstat -
Shell
:: CommandProcessor # readable?(file) -> bool (27904.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable? -
Shell
:: CommandProcessor # readable _ real?(file) -> bool (27904.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable_real? -
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (27658.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
... -
Shell
:: Filter # glob(pattern) -> Shell :: Filter (27658.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
... -
Gem
:: Command # defaults _ str -> String (27622.0) -
このメソッドはサブクラスで再定義されます。 コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。
このメソッドはサブクラスで再定義されます。
コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。
@see Gem::Command#arguments -
Kernel
# cc _ command(opt = "") -> String (27607.0) -
実際にコンパイルする際に使用するコマンドを返します。
実際にコンパイルする際に使用するコマンドを返します。
@param opt コンパイラに与える追加のコマンドライン引数を指定します。
@see RbConfig.expand -
Gem
:: Command # begins?(long , short) -> bool (27604.0) -
long が short で始まる文字列である場合真を返します。そうでない場合は偽を返します。
long が short で始まる文字列である場合真を返します。そうでない場合は偽を返します。
@param long 長いコマンドラインオプションを指定します。
@param short 短いコマンドラインオプションを指定します。 -
Gem
:: Commands :: LockCommand # spec _ path(gem _ full _ name) -> String (27604.0) -
指定された Gem パッケージの gemspec ファイルのフルパスを返します。
指定された Gem パッケージの gemspec ファイルのフルパスを返します。
@param gem_full_name Gem パッケージの名前を指定します。 -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (27604.0) -
RI から Ruby のドキュメントを参照します。
RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソッド
名などを入力する事でドキュメントの検索が行えます。入力のタブ補完をする
事ができます。また、空行を入力する事で irb のプロンプトに戻る事ができま
す。
irb(main):001:0> help
Enter the method name you want to look... -
IRB
:: ExtendCommand :: Require # execute(file _ name) -> bool (27604.0) -
ファイル file_name を現在の irb インタプリタ上で実行します。
ファイル file_name を現在の irb インタプリタ上で実行します。
file_name に Ruby スクリプトを指定した場合は、Kernel.#require と異
なり、file_name の内容を irb で一行ずつタイプしたかのように、irb 上で一
行ずつ評価されます。require に成功した場合は true を、そうでない場合は
false を返します。
拡張ライブラリ(*.so,*.o,*.dll など)を指定した場合は単純に require され
ます。
@param file_name ファイル名を文字列で指定します。 -
Shell
:: CommandProcessor # blockdev?(file) -> bool (27604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev? -
FileUtils
# sh(*cmd) {|result , status| . . . } (27322.0) -
与えられたコマンドを実行します。
与えられたコマンドを実行します。
与えられた引数が複数の場合、シェルを経由しないでコマンドを実行します。
@param cmd 引数の解釈に関しては Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #... -
Shell
:: SystemCommand # name -> String (27307.0) -
@todo
@todo
コマンド名を返します。 -
IRB
:: ExtendCommand :: Kill # execute(*obj) -> object (27004.0) -
指定したサブ irb を停止します。
指定したサブ irb を停止します。
@param obj 停止するサブ irb を識別する以下のいずれかのオブジェクトを指定します。
* irb インタプリタ番号
* irb オブジェクト
* スレッド ID
* 各インタプリタの self (「irb(obj)」で起動した時の obj) -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (20128.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file1 文字列でファイルへのパスを指定します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.m... -
Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (20128.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file1 文字列でファイルへのパスを指定します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.m... -
Shell
:: Filter # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (20128.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file1 文字列でファイルへのパスを指定します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.m... -
Shell
:: Filter # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (20128.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file1 文字列でファイルへのパスを指定します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.m... -
Shell
:: CommandProcessor # stat(filename) -> File :: Stat (19204.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.stat -
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (19045.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 # cat(*files) -> Shell :: Filter (18958.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al... -
Shell
:: CommandProcessor # tee(file) -> Shell :: Filter (18958.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param file シェルコマンドtee に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all... -
Shell
:: Filter # cat(*files) -> Shell :: Filter (18958.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al... -
Shell
:: Filter # tee(file) -> Shell :: Filter (18958.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param file シェルコマンドtee に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all... -
Shell
:: ProcessController # start _ job(command = nil) (18925.0) -
指定されたコマンドの実行を開始します。
指定されたコマンドの実行を開始します。
コマンドを省略した場合は、待ち状態のジョブのうち先頭のものを実行します。
@param command コマンドを指定します。