48件ヒット
[1-48件を表示]
(0.022秒)
クラス
-
Rake
:: DefaultLoader (12) -
Rake
:: FileList (12) - String (12)
モジュール
- FileUtils (12)
検索結果
先頭4件
-
Rake
:: FileList # pathmap(spec = nil) -> Rake :: FileList (9215.0) -
各要素に String#pathmap を適用した新しい Rake::FileList を返します。
...各要素に String#pathmap を適用した新しい Rake::FileList を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.pathmap("%n") # => ["test1",......"test2", "test3"]
end
//}
@see String#pathmap... -
String
# pathmap(spec = nil) { . . . } -> String (6139.0) -
与えられた書式指定文字列に応じてパス(自身)を変換します。
...ント自身を表します。
%d は数値のプレフィクスを取ることができます。
例:
'a/b/c/d/file.txt'.pathmap("%2d") # => 'a/b'
'a/b/c/d/file.txt'.pathmap("%-2d") # => 'c/d'
また、%d, %p, %f, %n, %x, %X には単純な文字列置換を行うための
置換パタ......va".pathmap("%{^src,bin}X.class")
#=> "bin/org/onestepback/proj/A.class"
置換文字列に '*' を指定した場合は、置換文字列を計算するためにブロックを評価します。
例:
"/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext| ext.downcase }
#=> "/path/to/file.tx... -
FileUtils
# split _ all(path) -> Array (3110.0) -
与えられたパスをディレクトリごとに分割します。
...与えられたパスをディレクトリごとに分割します。
@param path 分割するパスを指定します。
例:
split_all("a/b/c") # => ['a', 'b', 'c']... -
Rake
:: DefaultLoader # load(filename) (109.0) -
与えられたファイルをロードします。
...与えられたファイルをロードします。
@param filename ロードするファイル名を指定します。
//emlist[][ruby]{
require 'rake'
loader = Rake::DefaultLoader.new
loader.load("path/to/Rakefile") # => true
//}...