別のキーワード
ライブラリ
- ビルトイン (32)
-
drb
/ extservm (2) - fileutils (1)
-
irb
/ cmd / chws (2) -
irb
/ cmd / help (1) -
irb
/ cmd / load (3) -
irb
/ cmd / nop (4) -
irb
/ cmd / pushws (3) -
irb
/ cmd / subirb (4) -
irb
/ ext / use-loader (2) -
irb
/ extend-command (11) - mkmf (8)
-
net
/ imap (1) - optparse (12)
- pty (4)
-
rake
/ packagetask (2) -
rubygems
/ command (26) -
rubygems
/ command _ manager (8) -
rubygems
/ commands / build _ command (5) -
rubygems
/ commands / dependency _ command (6) -
rubygems
/ commands / help _ command (2) -
rubygems
/ commands / lock _ command (2) -
rubygems
/ commands / unpack _ command (1) -
rubygems
/ commands / update _ command (1) -
rubygems
/ commands / which _ command (3) - shell (15)
-
shell
/ builtin-command (2) -
shell
/ command-processor (74) -
shell
/ filter (15) -
shell
/ process-controller (3) -
shell
/ system-command (12) - un (1)
クラス
-
DRb
:: ExtServManager (2) -
Gem
:: Command (26) -
Gem
:: CommandManager (8) -
Gem
:: Commands :: BuildCommand (5) -
Gem
:: Commands :: DependencyCommand (6) -
Gem
:: Commands :: HelpCommand (2) -
Gem
:: Commands :: LockCommand (2) -
Gem
:: Commands :: UnpackCommand (1) -
Gem
:: Commands :: UpdateCommand (1) -
Gem
:: Commands :: WhichCommand (3) - IO (14)
-
IRB
:: ExtendCommand :: ChangeWorkspace (1) -
IRB
:: ExtendCommand :: CurrentWorkingWorkspace (1) -
IRB
:: ExtendCommand :: Foreground (1) -
IRB
:: ExtendCommand :: Help (1) -
IRB
:: ExtendCommand :: IrbCommand (1) -
IRB
:: ExtendCommand :: Jobs (1) -
IRB
:: ExtendCommand :: Kill (1) -
IRB
:: ExtendCommand :: Load (1) -
IRB
:: ExtendCommand :: Nop (4) -
IRB
:: ExtendCommand :: PopWorkspace (1) -
IRB
:: ExtendCommand :: PushWorkspace (1) -
IRB
:: ExtendCommand :: Require (1) -
IRB
:: ExtendCommand :: Source (1) -
IRB
:: ExtendCommand :: Workspaces (1) -
Net
:: IMAP :: FetchData (1) - OptionParser (12)
-
Rake
:: PackageTask (2) - Shell (15)
-
Shell
:: BuiltInCommand (2) -
Shell
:: CommandProcessor (74) -
Shell
:: Filter (15) -
Shell
:: ProcessController (3) -
Shell
:: SystemCommand (12)
モジュール
- FileUtils (1)
-
IRB
:: ContextExtender (2) -
IRB
:: ExtendCommandBundle (11) - Kernel (24)
- PTY (4)
- Process (1)
- Signal (2)
キーワード
- < (1)
- >> (1)
- EXAMPLES (1)
- EXT (1)
- HELP (1)
-
NEWS for Ruby 2
. 5 . 0 (1) -
NO
_ OVERRIDE (1) - NoDelegateMethods (1)
-
OVERRIDE
_ ALL (1) -
OVERRIDE
_ PRIVATE _ ONLY (1) - PLATFORMS (1)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (1)
- [] (4)
- ` (1)
- active? (2)
-
add
_ extra _ args (1) -
add
_ schedule (1) -
alias
_ command (3) -
alias
_ map (1) - append (1)
- arguments (3)
- atime (1)
- attr (1)
- basename (1)
- begins? (1)
- blockdev? (1)
-
build
_ args (1) - cat (3)
-
cc
_ command (1) - chardev? (1)
- chmod (1)
- chown (1)
-
command
_ names (1) -
command
_ processor (1) - commands (1)
- complain (1)
- concat (1)
-
cpp
_ command (1) - ctime (1)
-
def
_ builtin _ commands (1) -
def
_ extend _ command (2) -
def
_ system _ command (2) - defaults (1)
-
defaults
_ str (1) - delete (1)
- description (1)
- directory? (1)
- dirname (1)
- echo (3)
- exec (5)
- executable? (1)
-
executable
_ real? (1) - execute (18)
- exist? (1)
- exists? (1)
-
extend
_ object (1) -
extra
_ args (1) - file? (1)
-
find
_ command (1) -
find
_ command _ possibilities (1) -
find
_ gems (1) -
find
_ paths (1) -
find
_ reverse _ dependencies (1) - flush (1)
- foreach (1)
- ftype (1)
-
gem
_ paths (1) -
get
_ all _ gem _ names (1) -
get
_ one _ gem _ name (1) -
get
_ one _ optional _ argument (1) -
get
_ path (1) - getpty (2)
- glob (3)
- grpowned? (1)
- handles? (1)
- help (1)
- initialize (1)
-
install
_ builtin _ commands (1) -
install
_ extend _ commands (2) -
install
_ system _ commands (2) - instance (1)
-
irb
_ context (2) -
irb
_ exit (1) -
irb
_ load (1) -
irb
_ original _ method _ name (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)
- new (1)
- notify (3)
- on (12)
- open (1)
-
optparse
/ uri (1) - out (3)
- owned? (1)
- pipe? (1)
- popen (14)
-
print
_ dependencies (1) -
process
_ args (1) -
program
_ name (1) - rdoc (1)
- readable? (1)
-
readable
_ real? (1) - readlink (1)
-
register
_ command (1) - rehash (1)
- rename (1)
- rm (1)
- rmdir (1)
-
ruby 1
. 8 . 4 feature (1) - rubygems (1)
-
rubygems
/ commands / environment _ command (1) -
rubygems
/ commands / generate _ index _ command (1) -
rubygems
/ commands / help _ command (1) -
rubygems
/ commands / lock _ command (1) - run (1)
-
run
_ config (1) - service (1)
- setgid? (1)
- setuid? (1)
- sfork (1)
-
show
_ help (1) -
show
_ lookup _ failure (1) - size (1)
- size? (1)
- socket? (1)
- spawn (6)
-
spec
_ path (1) -
specific
_ extra _ args (1) -
specific
_ extra _ args _ hash (1) - split (1)
- start (1)
-
start
_ import (1) - stat (1)
- sticky? (1)
- summary (1)
-
super
_ each (1) - symlink (1)
- symlink? (1)
- system (7)
-
tar
_ command (1) - tee (3)
- terminate (1)
- test (3)
-
to
_ a (1) -
to
_ s (1) - transact (3)
- trap (4)
- truncate (1)
-
try
_ do (2) - tsort (1)
-
unalias
_ command (2) -
undef
_ system _ command (2) - unlink (1)
- usage (3)
- utime (1)
- wait? (2)
-
when
_ invoked (1) -
which
_ to _ update (1) - writable? (1)
-
writable
_ real? (1) - xpopen (2)
- xsystem (1)
- yaml? (1)
- zero? (1)
-
zip
_ command (1) - | (1)
検索結果
先頭5件
-
Gem
:: Command # command -> String (63604.0) -
コマンドの名前を返します。
コマンドの名前を返します。 -
Shell
:: SystemCommand # command -> String (63604.0) -
@todo
@todo
コマンド名を返します。 -
DRb
:: ExtServManager . command -> { String => String|[String] } (54922.0) -
サービスを起動するためのコマンドを指定するための Hash を 返します。
サービスを起動するためのコマンドを指定するための Hash を
返します。
Hash のキーがサービス名で、値がそのサービスを起動するためのコマンドです。
この Hash を変更することでサービスを定義します。
DRb::ExtServManager.command= で Hash 自体を
変更することでも同じことができます。
コマンドは文字列、もしくは文字列の配列で指定します。
文字列で指定した場合は Kernel.#spawn で
プロセスを起動する際に shell 経由で起動されます。
文字列の配列で指定すると shell を経由せずに起動されます。 -
Shell
:: Filter # >(to) -> self (54355.0) -
toをフィルタの出力とする。 toが, 文字列ならばファイルに, IOオブジェクトであれ ばそれをそのまま出力とする。
toをフィルタの出力とする。 toが, 文字列ならばファイルに, IOオブジェクトであれ
ばそれをそのまま出力とする。
@param to 出力先を指定します。文字列ならばファイルに,IOオブジェクトならばそれに出力します。
使用例
require 'shell'
Shell.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") > File.open("tail.out", "w")
#(sh.tail("-n 3") < "/e... -
rubygems
/ commands / generate _ index _ command (36055.0) -
ある Gem サーバに対するインデックスを作成するためのライブラリです。
ある Gem サーバに対するインデックスを作成するためのライブラリです。
Usage: gem generate_index [options]
Options:
-d, --directory=DIRNAME repository base dir containing gems subdir
Common Options:
-h, --help このコマンドのヘルプを表示します
-V, --[no-]verbose 表示を詳細にします
... -
rubygems
/ commands / lock _ command (36055.0) -
指定された特定のバージョンの Gem パッケージに依存する Gem を使用するために 必要な Kernel#gem メソッドの呼び出し方法を文字列で出力します。
指定された特定のバージョンの Gem パッケージに依存する Gem を使用するために
必要な Kernel#gem メソッドの呼び出し方法を文字列で出力します。
Usage: gem lock GEMNAME-VERSION [GEMNAME-VERSION ...] [options]
Options:
-s, --[no-]strict 依存関係を満たせない場合に失敗します
Common Options:
-h, --help このコマンドのヘルプを表示します
... -
rubygems
/ commands / help _ command (36037.0) -
Gem コマンドに関するヘルプを提供するためのライブラリです。
Gem コマンドに関するヘルプを提供するためのライブラリです。
Usage: gem help ARGUMENT [options]
Common Options:
-h, --help このコマンドのヘルプを表示します
-V, --[no-]verbose 表示を詳細にします
-q, --quiet 静かに実行します
--config-file FILE 指定された設定ファイルを使用します
... -
rubygems
/ commands / environment _ command (36019.0) -
RubyGems の環境に関する情報を表示するためのライブラリです。
RubyGems の環境に関する情報を表示するためのライブラリです。
Usage: gem environment [arg] [options]
Common Options:
-h, --help このコマンドのヘルプを表示します
-V, --[no-]verbose 表示を詳細にします
-q, --quiet 静かに実行します
--config-file FILE 指定された設定ファイル... -
Shell
:: CommandProcessor . def _ system _ command(command , path = command) -> () (28264.0) -
@todo
@todo
与えられたコマンドをメソッドとして定義します。
@param command 定義したいコマンドを指定します。
@param path command のパスを指定します。省略すると環境変数 PATH から command を探します。 -
Gem
:: CommandManager # find _ command(command _ name) -> Gem :: Command | nil (28246.0) -
登録されているコマンドからマッチしたものを返します。
登録されているコマンドからマッチしたものを返します。
@param command_name コマンド名を文字列で指定します。
@return Gem::Command のサブクラスのインスタンスを返します。
@raise RuntimeError マッチする可能性のあるコマンドが複数ある場合に発生します。
また、マッチするコマンドが無かった場合にも発生します。 -
Shell
:: CommandProcessor . alias _ command(alias , command , *opts) -> self (27931.0) -
@todo
@todo
@param alias エイリアスの名前を指定します。
@param command コマンド名を指定します。
@param opts コマンドに与えるオプションを指定します。
@raise SyntaxError コマンドのエイリアス作成に失敗した時に発生します。 -
Shell
:: CommandProcessor . alias _ command(alias , command , *opts) { . . . } -> self (27931.0) -
@todo
@todo
@param alias エイリアスの名前を指定します。
@param command コマンド名を指定します。
@param opts コマンドに与えるオプションを指定します。
@raise SyntaxError コマンドのエイリアス作成に失敗した時に発生します。 -
Gem
:: CommandManager # find _ command _ possibilities(command _ name) -> Array (27925.0) -
登録されているコマンドでマッチする可能性のあるものを返します。
登録されているコマンドでマッチする可能性のあるものを返します。
@param command_name コマンド名を文字列で指定します。 -
Gem
:: CommandManager # register _ command(command _ name) -> false (27925.0) -
コマンドを自身に登録します。
コマンドを自身に登録します。
@param command_name コマンド名をシンボルで指定します。 -
Shell
:: CommandProcessor . undef _ system _ command(command) -> self (27925.0) -
与えられたコマンドを削除します。
与えられたコマンドを削除します。
@param command 削除したいコマンド名を指定します。 -
Shell
:: CommandProcessor . def _ builtin _ commands(delegation _ class , commands _ specs) -> () (27901.0) -
@todo
@todo
@param delegation_class 処理を委譲したいクラスかモジュールを指定します。
@param commands_specs コマンドの仕様を文字列の配列で指定します。
[[コマンド名, [引数1, 引数2, ...]], ...] -
IRB
:: ExtendCommandBundle . install _ extend _ commands -> object (27619.0) -
定義済みの拡張を読み込みます。
定義済みの拡張を読み込みます。
irb で以下のメソッドが利用できるようになります。(それぞれ 1 つだけ抜粋)
* irb_current_working_workspace
* irb_change_workspace
* irb_workspaces
* irb_push_workspace
* irb_pop_workspace
* irb_load
* irb_require
* irb_source
* irb
* irb_jobs
* irb_fg
* irb_kill
* irb_help
irb/extend-command が requir... -
Gem
:: CommandManager # command _ names -> Array (27604.0) -
登録されているコマンド名の配列を返します。
登録されているコマンド名の配列を返します。 -
IRB
:: ExtendCommandBundle . def _ extend _ command(cmd _ name , cmd _ class , load _ file = nil , *aliases) -> object (27604.0) -
irb に cmd_name で指定したメソッドが実行できるように拡張します。
irb に cmd_name で指定したメソッドが実行できるように拡張します。
@param cmd_name メソッド名を Symbol か文字列で指定します。
cmd_class で指定するクラスの execute メソッドとして定
義してある必要があります。
@param cmd_class 指定した拡張が定義されたクラス名を Symbol、
String、Class のいずれかで指定します。
なお、このクラスは IRB::ExtendCommand ... -
Shell
:: CommandProcessor . unalias _ command(alias) -> self (27604.0) -
エイリアスを削除します。
エイリアスを削除します。
@param alias 削除したいエイリアスを指定します。 -
Shell
:: CommandProcessor . install _ builtin _ commands -> () (27601.0) -
ビルトインコマンドを定義します。
ビルトインコマンドを定義します。 -
Shell
:: CommandProcessor . install _ system _ commands(prefix = "sys _ ") -> () (27601.0) -
全てのシステムコマンドをメソッドとして定義します。
全てのシステムコマンドをメソッドとして定義します。
既に定義されているコマンドを再定義することはありません。
デフォルトでは全てのコマンドに "sys_" というプレフィクスが付きます。
また、メソッド名として使用できない文字は全て "_" に置換してメソッドを定義します。
このメソッドの実行中に発生した例外は単に無視されます。
@param prefix プレフィクスを指定します。 -
Shell
. def _ system _ command(command , path = command) -> nil (19348.0) -
Shell のメソッドとして command を登録します.
Shell のメソッドとして command を登録します.
OS上のコマンドを実行するにはまず, Shellのメソッドとして定義します.
注) コマンドを定義しなくとも直接実行できる Shell#system コマンドもあります.
@param command Shell のメソッドとして定義するコマンドを文字列で指定します。
@param path command のパスを指定します。
指定しない場合はcommand と同じになります。
例)
require 'shell'
Shell.def_system_command "ls"
# ls ... -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (19309.0) -
commandを削除します.
commandを削除します.
@param command 削除するコマンドの文字列を指定します。
動作例:
require 'shell'
Shell.def_system_command("ls")
# ls を定義
Shell.undef_system_command("ls")
# ls を 削除
sh = Shell.new
begin
sh.transact {
ls("-l").each {|l|
puts l
}
}
rescue NameError => err
puts ... -
Shell
. alias _ command(alias , command , *opts) { . . . } -> self (19045.0) -
コマンドの別名(エイリアス)を作成します。 コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
コマンドの別名(エイリアス)を作成します。
コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
@param alias エイリアスの名前を文字列で指定します.
@param command コマンド名を文字列で指定します.
@param opts command で指定したコマンドのオプションを指定します.
使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell.def_system_command("ls")
Shell.alias_command("lsla", "... -
Shell
# command _ processor -> Shell :: CommandProcessor (18904.0) -
@todo
@todo -
Shell
. unalias _ command(alias) -> () (18742.0) -
commandのaliasを削除します.
commandのaliasを削除します.
@param alias 削除したいエイリアスの名前を文字列で指定します。
@raise NameError alias で指定したコマンドが無い場合に発生します。
使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell.def_system_command("ls")
Shell.alias_command("lsla", "ls", "-a", "-l")
Shell.def_system_command("sort")
sh = Shell.new
sh.trans... -
IRB
:: ContextExtender . install _ extend _ commands -> object (18637.0) -
定義済みの拡張を読み込みます。
定義済みの拡張を読み込みます。
IRB::Context で以下のメソッドが利用できるようになります。
* eval_history=
* use_tracer=
* math_mode=
* use_loader=
* save_history=
irb/extend-command が require された時にライブラリ内部で自動的
に実行されます。
@see IRB::ContextExtender.def_extend_command -
IRB
:: ContextExtender . def _ extend _ command(cmd _ name , load _ file , *aliases) -> object (18604.0) -
IRB::Context に cmd_name で指定したメソッドが実行できるように拡張 します。
IRB::Context に cmd_name で指定したメソッドが実行できるように拡張
します。
@param cmd_name メソッド名を Symbol で指定します。
IRB::Context クラスのインスタンスメソッドとして定
義してある必要があります。
@param load_file cmd_name で指定したメソッドが定義されたファイル名を指
定します。このファイルは自動的に require されます。
@param aliases cmd_name の別名を Symb... -
Kernel
# cc _ command(opt = "") -> String (18604.0) -
実際にコンパイルする際に使用するコマンドを返します。
実際にコンパイルする際に使用するコマンドを返します。
@param opt コンパイラに与える追加のコマンドライン引数を指定します。
@see RbConfig.expand -
Kernel
# cpp _ command(outfile , opt = "") -> String (18604.0) -
実際にプリプロセッサを実行する際に使用するコマンドを返します。
実際にプリプロセッサを実行する際に使用するコマンドを返します。
@param outfile 出力ファイルの名前を指定します。
@param opt プリプロセッサに与える追加のコマンドライン引数を指定します。
@see RbConfig.expand -
Kernel
# link _ command(ldflags , opt = "" , libpath = $ DEFLIBPATH| $ LIBPATH) -> String (18604.0) -
実際にリンクする際に使用するコマンドを返します。
実際にリンクする際に使用するコマンドを返します。
@param ldflags LDFLAGS に追加する値を指定します。
@param opt LIBS に追加する値を指定します。
@param libpath LIBPATH に指定する値を指定します。
@see RbConfig.expand -
Rake
:: PackageTask # tar _ command -> String (18604.0) -
tar コマンドとして使用するコマンドを返します。
tar コマンドとして使用するコマンドを返します。
デフォルトは 'tar' です。 -
Rake
:: PackageTask # zip _ command -> String (18604.0) -
zip コマンドとして使用するコマンドを返します。
zip コマンドとして使用するコマンドを返します。
デフォルトは 'zip' です。 -
FileUtils
. commands -> Array (18601.0) -
何らかのオプションを持つメソッド名の配列を返します。
何らかのオプションを持つメソッド名の配列を返します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.commands # => ["chmod", "cp", "cp_r", "install", ...]
//} -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (18601.0) -
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ
ド名は元のファイル名の頭にpreをつけたものとなる.
@param pre Shellに定義するメソッド名の先頭に付加される文字列を指定します。
使用例: ls -l | head -n 5 のような例。
require 'shell'
Shell.install_system_commands
sh = Shell.new
sh.verbose = false
sh.transact {
(sys_ls("-l") | sys_head("-n 5")).each {|l... -
Shell
:: Filter # >>(to) -> self (18319.0) -
toをフィルタに追加する。 toが, 文字列ならばファイルに, IOオブジェクトであれば それをそのまま出力とする。
toをフィルタに追加する。 toが, 文字列ならばファイルに, IOオブジェクトであれば
それをそのまま出力とする。
@param to 出力先を指定します。文字列ならばファイルに、IOオブジェクトならばそれに出力します。
使用例
require 'shell'
Shell.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") >> "tail.out"
#(sh.tail("-n 3") < "/etc/passwd") >> ... -
Shell
:: SystemCommand # name -> String (18304.0) -
@todo
@todo
コマンド名を返します。 -
Gem
:: Commands :: BuildCommand # arguments -> String (18301.0) -
引数の説明を表す文字列を返します。
引数の説明を表す文字列を返します。 -
Gem
:: Commands :: BuildCommand # execute -> () (18301.0) -
コマンドを実行します。
コマンドを実行します。 -
Gem
:: Commands :: BuildCommand # load _ gemspecs(filename) -> Array (18301.0) -
gemspec ファイルをロードします。
gemspec ファイルをロードします。
@param filename ファイル名を指定します。 -
Gem
:: Commands :: BuildCommand # usage -> String (18301.0) -
使用方法を表す文字列を返します。
使用方法を表す文字列を返します。 -
Gem
:: Commands :: BuildCommand # yaml?(filename) -> bool (18301.0) -
与えられたファイル名を持つファイルが yaml ファイルである場合に真を返します。
与えられたファイル名を持つファイルが yaml ファイルである場合に真を返します。
@param filename ファイル名を指定します。 -
Gem
:: Commands :: DependencyCommand # arguments -> String (18301.0) -
引数の説明を表す文字列を返します。
引数の説明を表す文字列を返します。 -
Gem
:: Commands :: DependencyCommand # execute -> () (18301.0) -
コマンドを実行します。
コマンドを実行します。 -
Gem
:: Commands :: DependencyCommand # find _ gems(name , source _ index) -> Hash (18301.0) -
与えられた Gem の名前をインデックスから検索します。
与えられた Gem の名前をインデックスから検索します。
@param name Gem の名前を指定します。
@param source_index Gem::SourceIndex のインスタンスを指定します。
@see Gem::SourceIndex#search -
Gem
:: Commands :: DependencyCommand # find _ reverse _ dependencies(spec) -> Array (18301.0) -
与えられた Gem スペックに依存する Gem のリストを返します。
与えられた Gem スペックに依存する Gem のリストを返します。
@param spec Gem::Specification のインスタンスを指定します。 -
Gem
:: Commands :: DependencyCommand # print _ dependencies(spec , level = 0) -> String (18301.0) -
依存関係を表す文字列を返します。
依存関係を表す文字列を返します。
@param spec Gem::Specification のインスタンスを指定します。
@param level 依存関係の深さを指定します。 -
Gem
:: Commands :: DependencyCommand # usage -> String (18301.0) -
使用方法を表す文字列を返します。
使用方法を表す文字列を返します。 -
Gem
:: Commands :: HelpCommand :: EXAMPLES -> String (18301.0) -
使用例を表す文字列です。
使用例を表す文字列です。 -
Gem
:: Commands :: HelpCommand :: PLATFORMS -> String (18301.0) -
プラットフォームに関する記述を格納している文字列です。
プラットフォームに関する記述を格納している文字列です。 -
Gem
:: Commands :: LockCommand # complain(message) -> () (18301.0) -
指定されたメッセージを表示します。--strict が有効な場合は例外が発生します。
指定されたメッセージを表示します。--strict が有効な場合は例外が発生します。
@param message 表示するメッセージを指定します。
@raise Gem::Exception コマンドラインオプションに --strict が指定されている場合に発生します。 -
Gem
:: Commands :: LockCommand # spec _ path(gem _ full _ name) -> String (18301.0) -
指定された Gem パッケージの gemspec ファイルのフルパスを返します。
指定された Gem パッケージの gemspec ファイルのフルパスを返します。
@param gem_full_name Gem パッケージの名前を指定します。 -
Gem
:: Commands :: UnpackCommand # get _ path(gemname , version _ req) -> String | nil (18301.0) -
引数で指定された条件にマッチする Gem パッケージを保存しているパスを返します。
引数で指定された条件にマッチする Gem パッケージを保存しているパスを返します。
@param gemname Gem パッケージの名前を指定します。
@param version_req バージョンの満たすべき条件を文字列で指定します。 -
Gem
:: Commands :: UpdateCommand # which _ to _ update(highest _ installed _ gems , gem _ names) -> Array (18301.0) -
更新が必要な Gem のリストを返します。
更新が必要な Gem のリストを返します。 -
Gem
:: Commands :: WhichCommand # find _ paths(package _ name , dirs) -> Array (18301.0) -
dirs から package_name という名前を持つファイルを探索します。
dirs から package_name という名前を持つファイルを探索します。
以下の拡張子を持つファイルが対象です。
%w[.rb .rbw .so .dll .bundle]
@param package_name ファイルの名前を指定します。
@param dirs 探索するディレクトリを文字列の配列で指定します。 -
Gem
:: Commands :: WhichCommand # gem _ paths(spec) -> Array (18301.0) -
与えられた Gem::Specification のインスタンスからその Gem が require するファイルのあるディレクトリをまとめて返します。
与えられた Gem::Specification のインスタンスからその Gem が
require するファイルのあるディレクトリをまとめて返します。
@param spec Gem::Specification のインスタンスを指定します。 -
Gem
:: Commands :: WhichCommand :: EXT -> [String] (18301.0) -
拡張子を表す配列です。
拡張子を表す配列です。
%w[.rb .rbw .so .dll .bundle] -
IRB
:: ExtendCommand :: IrbCommand # execute(*obj) -> IRB :: Irb (18301.0) -
新しいサブ irb インタプリタを起動します。
新しいサブ irb インタプリタを起動します。
@param obj 新しいサブ irb インタプリタで self にするオブジェクトを指定
します。省略した場合は irb を起動したときの main オブジェク
トを self にします。 -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (10024.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 -
Gem
:: CommandManager # [](command _ name) -> Gem :: Command | nil (9925.0) -
引数で指定されたコマンド名に対応するクラスのインスタンスを返します。
引数で指定されたコマンド名に対応するクラスのインスタンスを返します。
@param command_name コマンド名を文字列で指定します。 -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (9625.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 (9625.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... -
Gem
:: CommandManager . instance -> Gem :: CommandManager (9601.0) -
自身をインスタンス化します。
自身をインスタンス化します。 -
IRB
:: ExtendCommand :: Nop . new(conf) -> IRB :: ExtendCommand :: Nop (9601.0) -
自身を初期化します。ユーザが直接使用するものではありません。
自身を初期化します。ユーザが直接使用するものではありません。
@param conf IRB::Context オブジェクトを指定します。 -
IRB
:: ExtendCommandBundle . extend _ object(obj) -> IRB :: ExtendCommandBundle (9601.0) -
IRB::ExtendCommandBundle で定義済みの拡張に指定されたエイリアスを obj に定義します。
IRB::ExtendCommandBundle で定義済みの拡張に指定されたエイリアスを
obj に定義します。
@param obj IRB::ExtendCommandBundle を extend したオブジェクト -
Shell
:: CommandProcessor # transact { . . . } -> object (9355.0) -
ブロック中で shell を self として実行します。
ブロック中で shell を self として実行します。
例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
} -
Shell
:: CommandProcessor . alias _ map -> Hash (9349.0) -
Shell::CommandProcessor.alias_command で定義したエイリアスの一覧を返します。
Shell::CommandProcessor.alias_command で定義したエイリアスの一覧を返します。 -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (9337.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... -
Gem
:: Command # defaults _ str -> String (9319.0) -
このメソッドはサブクラスで再定義されます。 コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。
このメソッドはサブクラスで再定義されます。
コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。
@see Gem::Command#arguments -
IRB
:: ExtendCommandBundle :: NO _ OVERRIDE -> 0 (9319.0) -
irb でコマンドのエイリアスを定義する際に、既にこれからエイリアス先に指 定したメソッド名と同名のメソッドが定義済みであった場合、エイリアスを定 義しない事を指定するフラグです。
irb でコマンドのエイリアスを定義する際に、既にこれからエイリアス先に指
定したメソッド名と同名のメソッドが定義済みであった場合、エイリアスを定
義しない事を指定するフラグです。
@see IRB::ExtendCommandBundle.def_extend_command -
IRB
:: ExtendCommandBundle :: OVERRIDE _ ALL -> 1 (9319.0) -
irb でコマンドのエイリアスを定義する際に、既にこれからエイリアス先に指 定したメソッド名と同名のメソッドが定義済みであった場合でも、常にエイリ アスを定義する事を指定するフラグです。
irb でコマンドのエイリアスを定義する際に、既にこれからエイリアス先に指
定したメソッド名と同名のメソッドが定義済みであった場合でも、常にエイリ
アスを定義する事を指定するフラグです。
@see IRB::ExtendCommandBundle.def_extend_command -
IRB
:: ExtendCommandBundle :: OVERRIDE _ PRIVATE _ ONLY -> 2 (9319.0) -
irb でコマンドのエイリアスを定義する際に、既にこれからエイリアス先に指 定したメソッド名と同名の public メソッドが定義済みではなかった場合のみ、 エイリアスを定義する事を指定するフラグです。
irb でコマンドのエイリアスを定義する際に、既にこれからエイリアス先に指
定したメソッド名と同名の public メソッドが定義済みではなかった場合のみ、
エイリアスを定義する事を指定するフラグです。
@see IRB::ExtendCommandBundle.def_extend_command -
Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter (9319.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 # echo(*strings) -> Shell :: Filter (9319.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param strings シェルコマンド echo に与える引数を文字列で指定します。
動作例
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 # glob(pattern) -> Shell :: Filter (9319.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
:: CommandProcessor # out(dev = STDOUT , &block) -> () (9319.0) -
Shell#transact を呼び出しその結果を dev に出力します。
Shell#transact を呼び出しその結果を dev に出力します。
@param dev 出力先をIO オブジェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
File.open("out.txt", "w"){ |fp|
sh.out(fp) {
system("ls", "-l") | head("-n 3")
}
} -
Shell
:: CommandProcessor # tee(file) -> Shell :: Filter (9319.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... -
Gem
:: Command # add _ extra _ args(args) -> Array (9301.0) -
$HOME/.gemrc から読み込んだ引数を追加します。
$HOME/.gemrc から読み込んだ引数を追加します。
@param args 追加する引数を配列で指定します。 -
Gem
:: Command # arguments -> String (9301.0) -
このメソッドはサブクラスで再定義されます。 コマンドが取る引数の説明を表示するために使用します。
このメソッドはサブクラスで再定義されます。
コマンドが取る引数の説明を表示するために使用します。
サブクラスで実装する場合は、一つの引数につき一行で、左揃えの文字列を返すようにしてください。 -
Gem
:: Command # begins?(long , short) -> bool (9301.0) -
long が short で始まる文字列である場合真を返します。そうでない場合は偽を返します。
long が short で始まる文字列である場合真を返します。そうでない場合は偽を返します。
@param long 長いコマンドラインオプションを指定します。
@param short 短いコマンドラインオプションを指定します。 -
Gem
:: Command # defaults -> Hash (9301.0) -
デフォルトのオプションを返します。
デフォルトのオプションを返します。 -
Gem
:: Command # description -> String (9301.0) -
このメソッドはサブクラスで再定義されます。 コマンドが実行することを説明する文字列を返します。
このメソッドはサブクラスで再定義されます。
コマンドが実行することを説明する文字列を返します。 -
Gem
:: Command # execute -> () (9301.0) -
このメソッドはサブクラスで再定義されます。 コマンドを実行します。
このメソッドはサブクラスで再定義されます。
コマンドを実行します。
@raise RuntimeError このメソッドがサブクラスで再定義されていない場合に発生します。 -
Gem
:: Command # get _ all _ gem _ names -> Array (9301.0) -
コマンドラインで与えられた Gem の名前を全て取得して返します。
コマンドラインで与えられた Gem の名前を全て取得して返します。
@raise Gem::CommandLineError コマンドライン引数から Gem の名前を取得できない場合に発生します。 -
Gem
:: Command # get _ one _ gem _ name -> String (9301.0) -
コマンドラインで与えられた Gem の名前を一つ取得して返します。
コマンドラインで与えられた Gem の名前を一つ取得して返します。
@raise Gem::CommandLineError コマンドライン引数から Gem の名前を一つだけ取得できない場合に発生します。 -
Gem
:: Command # get _ one _ optional _ argument -> String (9301.0) -
コマンドラインからオプショナルな引数を取得して返します。
コマンドラインからオプショナルな引数を取得して返します。
@return 一つ以上、指定した場合は最初の値を返します。一つも指定していない場合は nil を返します。 -
Gem
:: Command # handles?(args) -> bool (9301.0) -
与えられた引数リストを処理することが出来れば真を返します。処理できない場合は偽を返します。
与えられた引数リストを処理することが出来れば真を返します。処理できない場合は偽を返します。
@param args 引数リストを指定子明日。 -
Gem
:: Command # merge _ options(new _ options) -> Hash (9301.0) -
与えられたオプションとデフォルトのオプションをマージします。 しかし、新しいオプションに同一のキーがあってもデフォルトのオプションは変更されません。
与えられたオプションとデフォルトのオプションをマージします。
しかし、新しいオプションに同一のキーがあってもデフォルトのオプションは変更されません。
@param new_options 新しいコマンドオプションをハッシュで指定します。 -
Gem
:: Command # options -> Hash (9301.0) -
コマンドで使用するオプションを返します。
コマンドで使用するオプションを返します。 -
Gem
:: Command # program _ name -> String (9301.0) -
コマンドラインで実行するときに使用するプログラム名を返します。
コマンドラインで実行するときに使用するプログラム名を返します。 -
Gem
:: Command # show _ help -> () (9301.0) -
コマンドの使用方法を表示します。
コマンドの使用方法を表示します。 -
Gem
:: Command # show _ lookup _ failure(gem _ name , version , errors = nil) -> () (9301.0) -
Gem が見つからなかった場合、メッセージを表示するために使用するメソッドです。
Gem が見つからなかった場合、メッセージを表示するために使用するメソッドです。
@param gem_name Gem の名前を指定します。
@param version Gem のバージョンを指定します。
@param errors Gem が見つからなかった理由を表すオブジェクトを格納した配列を指定します。 -
Gem
:: Command # summary -> String (9301.0) -
コマンドの短い説明を返します。
コマンドの短い説明を返します。 -
Gem
:: Command # usage -> String (9301.0) -
このメソッドはサブクラスで再定義されます。 個々の gem コマンドの使用方法を返します。
このメソッドはサブクラスで再定義されます。
個々の gem コマンドの使用方法を返します。 -
Gem
:: Command # when _ invoked { . . . } -> Proc (9301.0) -
コマンドが実行されたときに評価するブロックを登録します。
コマンドが実行されたときに評価するブロックを登録します。
通常のコマンド呼び出しは、そのコマンドクラスの execute メソッドを実行するだけです。
このメソッドでブロックを登録すると、通常の呼び出しを上書きすることができます。
これはテストメソッドで正しくコマンドの呼び出しが実行されたことを確認するのに使用することが出来ます。 -
Gem
:: Command . build _ args -> Array (9301.0) -
Gem をビルドするときに使用するパラメータを返します。
Gem をビルドするときに使用するパラメータを返します。 -
Gem
:: Command . common _ options -> Array (9301.0) -
共通の引数を返します。
共通の引数を返します。 -
Gem
:: Command . extra _ args -> Array (9301.0) -
追加の引数を返します。
追加の引数を返します。 -
Gem
:: Command . specific _ extra _ args(cmd) -> Array (9301.0) -
与えられたコマンドに対応する追加の引数を返します。
与えられたコマンドに対応する追加の引数を返します。
特別な追加引数はプログラムの開始時に Gem の設定ファイルから読み込まれます。
@param cmd コマンド名を指定します。