るりまサーチ

最速Rubyリファレンスマニュアル検索!
553件ヒット [1-100件を表示] (0.026秒)

別のキーワード

  1. shell/builtin-command new
  2. etc sc_shell
  3. shell/builtin-command each
  4. shell cd
  5. shell debug

検索結果

<< 1 2 3 ... > >>

shell (38096.0)

Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。

...は Ruby の機能を用いて実現します。

=== サンプル

==== Example 1:

require 'shell'
sh = Shell.cd("/tmp")
sh.mkdir "shell-test-1" unless sh.exists?("shell-test-1")
sh.cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
unless sh.exists?(dir)
sh.mkdir dir...
...ST"
f.close
end
print sh.pwd
end
end

==== Example 2:

require 'shell'
sh = Shell.cd("/tmp")
sh.transact do
mkdir "shell-test-1" unless exists?("shell-test-1")
cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
if !exists?(dir)
mkdir dir...
...'shell'
sh = Shell.new
sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") > "tee12"
sh.cat("/etc/printcap") | sh.tee("tee1") >> "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") >> "tee12"

==== Example 4:

require 'shell'
sh = Shell.new...

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

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

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

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

Shell::Filter.new(sh) -> Shell::Filter (21218.0)

Shell::Filter クラスのインスタンスを返します。 通常このメソッドを直接使う機会は少ないでしょう。

...
Shell
::Filter クラスのインスタンスを返します。
通常このメソッドを直接使う機会は少ないでしょう。...

Shell::ProcessController.new(shell) (21214.0)

自身を初期化します。

...自身を初期化します。

@param shell Shell のインスタンスを指定します。...

Shell::CommandProcessor.new(shell) (21202.0)

@todo

@todo

絞り込み条件を変える

Shell::AppendFile.new(sh, filename) (21101.0)

@todo

@todo

Shell::AppendIO.new(sh, filename) (21101.0)

@todo

@todo

Shell::Cat.new(sh, *filenames) (21101.0)

@todo

@todo

Shell::Concat.new(sh, *jobs) (21101.0)

@todo

@todo

Shell::Echo.new(sh, *strings) (21101.0)

@todo

@todo

絞り込み条件を変える

Shell::Glob.new(sh, pattern) (21101.0)

@todo

@todo

Shell::SystemCommand.new(sh, command, *opts) (21101.0)

@todo

@todo

@param sh

@param command

@param opts

Shell::Tee.new(sh, filename) (21101.0)

@todo

@todo

Shell::Void.new(sh, *opts) (21101.0)

WIN32OLE_TYPELIB.new(libname, mjv = nil, miv = nil) -> WIN32OLE_TYPELIB (18143.0)

WIN32OLE_TYPELIBオブジェクトを生成します。

...

tlib1 = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
tlib2 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}')
tlib3 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}', 1.7)
tlib4 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000...
...046}', 1, 7)
tlib5 = WIN32OLE_TYPELIB.new("C:\\WINDOWS\\SYSTEM32\\SHELL32.DLL")
puts tlib1.name # => 'Microsoft Excel 14.0 Object Library'
puts tlib2.name # => 'Microsoft Excel 14.0 Object Library'
puts tlib3.name # => 'Microsoft Excel 14.0 Object Library'
puts tlib4.name # =...
...> 'Microsoft Excel 14.0 Object Library'
puts tlib5.name # => 'Microsoft Shell Controls And Automation'

TypeLibは、レジストリのHKEY_CLASS_ROOT\TypeLibキーの下にGUIDをキーとし
て格納されています。GUIDキーの下にバージョン番号キーが並び、ドキュメ...

絞り込み条件を変える

WIN32OLE_VARIANT.new(val, vartype = nil) -> WIN32OLE_VARIANT (18137.0)

指定したオブジェクトを値とするWIN32OLE_VARIANTオブジェクトを生成します。

...NilClass のいずれでもありません。

shell
= WIN32OLE.new('Shell.Application')
folder = shell.NameSpace('C:\\Users\\Public\\Documents')
item = folder.ParseName('test.txt')
v = WIN32OLE_VARIANT.new('Delete')
item.invokeVerb(v) # => ゴミ箱への移動...
...y表現はエンコーディングをASCII-8BITに設
定した文字列となります。

include WIN32OLE::VARIANT
bytes = WIN32OLE_VARIANT.new([1,2,3,4,5], VT_UI1 | VT_ARRAY)
bytes.value #=> "\x01\x02\x03\x04\x05"
bytes.value.encoding #=> #<Encoding:ASCII-8BIT>

@see WIN32OL...
<< 1 2 3 ... > >>