376件ヒット
[301-376件を表示]
(0.107秒)
別のキーワード
ライブラリ
- ビルトイン (12)
- json (12)
- mkmf (12)
- pathname (184)
-
rake
/ packagetask (36) - shell (60)
-
shell
/ command-processor (18) -
shell
/ filter (18) -
webrick
/ httpresponse (12) -
webrick
/ httpserver (12)
クラス
- Class (12)
- Dir (12)
- Pathname (184)
-
Rake
:: PackageTask (36) - Shell (60)
-
Shell
:: CommandProcessor (18) -
Shell
:: Filter (18) -
WEBrick
:: HTTPResponse (12) -
WEBrick
:: HTTPServer (12)
モジュール
- Kernel (12)
キーワード
- chdir (6)
- children (12)
- cleanpath (12)
- cwd (6)
-
dir
_ config (12) - dirname (12)
-
each
_ child (24) -
each
_ entry (15) - empty? (9)
- entries (12)
- fnmatch (12)
- foreach (18)
- getwd (6)
- glob (34)
-
json
_ creatable? (12) - mkdir (18)
- mount (12)
-
package
_ dir (12) -
package
_ dir= (12) -
package
_ dir _ path (12) - popdir (6)
- pushdir (6)
- pwd (6)
- read (12)
- realdirpath (12)
- realpath (24)
-
relative
_ path _ from (12) -
set
_ redirect (12)
検索結果
先頭5件
-
Shell
:: Filter # foreach(path = nil , &block) -> () (23.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
...pathがファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|... -
Pathname
# entries -> [Pathname] (19.0) -
self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。
...rrno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。
//emlist[例][ruby]{
require 'pathname'
require 'pp'
pp Pathname('/usr/local').entries
# => [#<Pathname:.>,
# #<Pathname:..>,
# #<Pathname:bin>,
# #<Pathname:etc>,
#......#<Pathname:include>,
# #<Pathname:lib>,
# #<Pathname:opt>,
# #<Pathname:sbin>,
# #<Pathname:share>,
# #<Pathname:var>]
//}
@see Dir.entries... -
Shell
# glob(pattern) -> Shell :: Filter (19.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...、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|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}
@see Dir.[]... -
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (19.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...、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|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}
@see Dir.[]... -
Shell
:: Filter # glob(pattern) -> Shell :: Filter (19.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...、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|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}
@see Dir.[]... -
Class
# json _ creatable? -> bool (13.0) -
シリアライズされた JSON 形式の文字列から、インスタンスを作成するのにこのクラスを使用できる場合は 真を返します。そうでない場合は、偽を返します。
...json_create というメソッドを実装していなければなりません。
また json_create の第一引数は必要なデータを含むハッシュを期待しています。
//emlist[例][ruby]{
require "json"
String.json_creatable? # => true
Dir.json_creatable? # => false
//}... -
Pathname
# fnmatch(pattern , *args) -> bool (13.0) -
File.fnmatch(pattern, self.to_s, *args) と同じです。
...ードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。
@param args File.fnmatch を参照してください。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
path.fnmatch("test*")... -
Shell
# cwd -> String (8.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Shell
# getwd -> String (8.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Shell
# pwd -> String (8.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...