るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.130秒)
トップページ > クエリ:-[x] > クエリ:r[x] > 種類:特異メソッド[x] > バージョン:2.4.0[x] > クラス:Shell[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

検索結果

Shell.debug_output_try_lock -> bool (18607.0)

@todo

@todo

@see Thread::Mutex#try_lock

Shell.default_record_separator -> String (18607.0)

執筆者募集

...執筆者募集

Shell
で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。

@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定しま...

Shell.verbose -> bool (18607.0)

@todo

@todo

Shell.verbose? -> bool (18607.0)

@todo

@todo

Shell.cd(path = nil, verbose = self.verbose) -> self (907.0)

pathをカレントディレクトリとするShellオブジェクトを生成します.

...クトリとするShellオブジェクトを生成します.

@param path カレントディレクトリとするディレクトリを文字列で指定します。

@param verbose true を指定すると冗長な出力を行います。


使用例
require 'shell'
sh = Shell.new
sh.cd("/tmp")...

絞り込み条件を変える

Shell.install_system_commands(pre = "sys_") -> () (643.0)

system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.

...イルを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|
puts l
}
}...

Shell.debug -> bool | Integer (607.0)

@todo

@todo

デバッグ用フラグを参照します。

Shell.debug? -> bool | Integer (607.0)

@todo

@todo

デバッグ用フラグを参照します。

Shell.default_system_path -> Array (607.0)

Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。

...
Shell
でもちいられるコマンドを検索する対象のパスを設定および、参照します。

@param path Shellでもちいられるコマンドを検索する対象のパスを文字列で指定します。

動作例
require 'shell'
p Shell.default_system_path
# 例
#=> [...
..."/opt/local/bin", "/opt/local/sbin", "/usr/bin", "/bin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/X11/bin", "/Users/kouya/bin"]
Shell
.default_system_path = ENV["HOME"] + "/bin"
p Shell.default_system_path
# => "/Users/kouya/bin"...

Shell.new(pwd = Dir.pwd, umask = nil) -> Shell (607.0)

プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.

...プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShell
ブジェクトを生成します.

@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir....

絞り込み条件を変える

Shell.notify(*opts) {|message| ... } -> String (607.0)

@todo

@todo

Shell.undef_system_command(command) -> Shell::CommandProcessor (607.0)

commandを削除します.

...mmand 削除するコマンドの文字列を指定します。

動作例:
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
}
}
r...