るりまサーチ

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

別のキーワード

  1. string []=
  2. string slice
  3. string []
  4. string slice!
  5. string gsub

キーワード

検索結果

<< 1 2 3 > >>

String#pathmap(spec = nil) { ... } -> String (9128.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 には単純な文字列置換を行うための
置換...
...athmap("%{^src,bin}X.class")
#=> "bin/org/onestepback/proj/A.class"

置換文字列に '*' を指定した場合は、置換文字列を計算するためにブロックを評価します。

例:

"/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext| ext.downcase }
#=> "/path/to/file.txt"...

Rake::Application#rakefile -> String (6204.0)

実際に使用されている Rakefile の名前を返します。

...実際に使用されている Rakefile の名前を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
Rake
.application.rakefile # => "Rakefile"
end
//}...

Rake::GemPackageTask#gem_file -> String (6204.0)

Gem パッケージの名前を返します。

Gem パッケージの名前を返します。

Rake::PackageTask#tar_bz2_file -> String (6204.0)

tar.bz2 用のファイル名を返します。

tar.bz2 用のファイル名を返します。

Rake::PackageTask#tar_gz_file -> String (6204.0)

tar.gz 用のファイル名を返します。

tar.gz 用のファイル名を返します。

絞り込み条件を変える

Rake::PackageTask#tgz_file -> String (6204.0)

tgz 用のファイル名を返します。

tgz 用のファイル名を返します。

Rake::PackageTask#zip_file -> String (6204.0)

zip ファイル用のファイル名を返します。

zip ファイル用のファイル名を返します。

Rake::FileList#ext(newext = &#39;&#39;) -> Rake::FileList (3137.0)

各要素に String#ext を適用した新しい Rake::FileList を返します。

...各要素に String#ext を適用した新しい Rake::FileList を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

IO.write("test1.rb", "test")
IO.write("test2.rb", "test")

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new("test1.rb", "test2.rb"...
..., "test3.rb")
file
_list.ext(".erb") # => ["test1.erb", "test2.erb", "test3.erb"]
end
//}

@see String#ext...

Rake::FileList#pathmap(spec = nil) -> Rake::FileList (3137.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...
<< 1 2 3 > >>