616件ヒット
[1-100件を表示]
(0.024秒)
別のキーワード
ライブラリ
- ビルトイン (36)
- benchmark (48)
- fileutils (12)
- matrix (12)
- rake (12)
- readline (12)
-
rexml
/ document (60) -
rexml
/ streamlistener (12) - shell (96)
-
shell
/ command-processor (42) -
shell
/ filter (78) - syslog (36)
- timeout (21)
-
win32
/ resolv (12)
クラス
- Dir (36)
- Matrix (12)
-
REXML
:: DocType (36) - Shell (96)
-
Shell
:: CommandProcessor (42) -
Shell
:: Filter (78) -
Win32
:: Resolv (12)
モジュール
キーワード
- < (6)
- > (6)
- >> (6)
- Entity (12)
-
NEWS for Ruby 2
. 6 . 0 (7) - NotationDecl (12)
- Syslog (12)
-
alias
_ command (6) - application= (12)
- benchmark (12)
- bm (12)
- bmbm (12)
- cat (18)
-
def
_ system _ command (6) -
default
_ system _ path (6) -
default
_ system _ path= (6) - echo (18)
- eigensystem (12)
- entitydecl (12)
-
external
_ id (12) -
get
_ hosts _ path (12) - glob (18)
-
install
_ system _ commands (6) - measure (12)
- new (12)
- open (24)
- open! (12)
- out (18)
- public (12)
- rake (12)
- rdoc (12)
- readline (12)
- reopen (12)
-
rexml
/ parsers / pullparser (12) -
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) -
rexml
/ parsers / ultralightparser (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
system
_ path (6) -
system
_ path= (6) - tee (18)
- timeout (21)
-
to
_ a (6) -
to
_ s (6) - transact (18)
- tsort (12)
-
unalias
_ command (6) -
undef
_ system _ command (6) - uptodate? (12)
- | (6)
- セキュリティモデル (12)
検索結果
先頭5件
-
Shell
# system(command , *opts) -> Shell :: SystemCommand (18225.0) -
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 (18225.0) -
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 (18225.0) -
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... -
REXML
:: DocType # system -> String | nil (18125.0) -
DTD のシステム識別子を返します。
...は nil を返します。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-......strict.dtd"
doctype.public # => "-//W3C//DTD XHTML 1.0 Strict//EN"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root SYSTEM "foobar">
EOS
doctype.system # => "foobar"
doctype.public # => nil
//}... -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (6129.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|
puts l
}
}... -
Shell
. default _ system _ path -> Array (6126.0) -
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
# => "/... -
Shell
. default _ system _ path=(path) (6126.0) -
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
# => "/... -
Shell
. def _ system _ command(command , path = command) -> nil (6125.0) -
Shell のメソッドとして command を登録します.
...る Shell#system コマンドもあります.
@param command Shell のメソッドとして定義するコマンドを文字列で指定します。
@param path command のパスを指定します。
指定しない場合はcommand と同じになります。
例)
require 'shell'......Shell.def_system_command "ls"
# ls を定義
Shell.def_system_command "sys_sort", "sort"
# sortコマンドをsys_sortとして定義
sh = Shell.new
sh.transact {
ls.each { |l|
puts l
}
(ls("-l") | sys_sort("-k 5")).each {|l|
puts l
}
}... -
Shell
# system _ path -> Array (6120.0) -
コマンドサーチパスの配列を返す。
...コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]... -
Shell
# system _ path=(path) (6120.0) -
コマンドサーチパスの配列を返す。
...コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]... -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (6119.0) -
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|... -
Matrix
# eigensystem -> Matrix :: EigenvalueDecomposition (3106.0) -
行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。
...inverse を満たします。
D のそれぞれの対角成分が行列の固有値です。
//emlist[例][ruby]{
require 'matrix'
m = Matrix[[1, 2], [3, 4]]
v, d, v_inv = m.eigensystem
d.diagonal? # => true
v.inv == v_inv # => true
(v * d * v_inv).round(5) == m # => true
//}
@raise ExceptionForMa... -
Dir
. new(path , encoding: Encoding . find("filesystem")) -> Dir (112.0) -
path に対するディレクトリストリームをオープンして返します。
...ディングと同じになります。
@raise Errno::EXXX オープンに失敗した場合に発生します。
//emlist[例: Dir.new][ruby]{
require 'tmpdir'
Dir.mktmpdir do |tmpdir|
d = Dir.new(tmpdir)
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
d =......coding: Encoding::UTF_8)
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
end
//}
//emlist[例: Dir.open][ruby]{
require 'tmpdir'
Dir.mktmpdir do |tmpdir|
d = Dir.open(tmpdir, encoding: Encoding::UTF_8)
p d.class # => Dir
p d.read.encoding # => #<Enco... -
Dir
. open(path , encoding: Encoding . find("filesystem")) -> Dir (112.0) -
path に対するディレクトリストリームをオープンして返します。
...ディングと同じになります。
@raise Errno::EXXX オープンに失敗した場合に発生します。
//emlist[例: Dir.new][ruby]{
require 'tmpdir'
Dir.mktmpdir do |tmpdir|
d = Dir.new(tmpdir)
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
d =......coding: Encoding::UTF_8)
p d.class # => Dir
p d.read.encoding # => #<Encoding:UTF-8>
d.close
end
//}
//emlist[例: Dir.open][ruby]{
require 'tmpdir'
Dir.mktmpdir do |tmpdir|
d = Dir.open(tmpdir, encoding: Encoding::UTF_8)
p d.class # => Dir
p d.read.encoding # => #<Enco...