るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

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

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

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

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

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

Rake::FileList#ext(newext = '') -> Rake::FileList (3141.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 (3141.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...

Rake::FileList#to_s -> String (3120.0)

全ての要素をスペースで連結した文字列を返します。

...全ての要素をスペースで連結した文字列を返します。

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

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList['a.c', 'b.c']
file
_list.to_s # => "a.c b.c"
end
//}...

Rake::FileList#gsub!(pattern, replace) -> self (3041.0)

自身に含まれるファイルリストのそれぞれのエントリに対して String#gsub を実行します。 自身を破壊的に変更します。

...トリに対して String#gsub を実行します。
自身を破壊的に変更します。

//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.gsub!(/\.rb/, ".erb") # => ["test1.erb", "test2.erb", "test3.erb"]
file
_list # => ["test1.erb", "test2.erb", "test3.erb"]
end
//}...

絞り込み条件を変える

Rake::FileList#sub!(pattern, replace) -> self (3041.0)

自身に含まれるファイルリストのそれぞれのエントリに対して String#sub を実行します。 自身を破壊的に変更します。

...に対して String#sub を実行します。
自身を破壊的に変更します。

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

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList['a.c', 'b.c']
file
_list.sub!(/\.c$/, '.o') # => ['a.o', 'b.o']
file
_list...

Rake::FileList#is_a?(klass) -> bool (3031.0)

自身に Array のフリをさせます。

...自身に Array のフリをさせます。

//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.is_a?(Array) # => true
file
_list.is_a?(String) # => false
end
//}...

Rake::FileList#kind_of?(klass) -> bool (3031.0)

自身に Array のフリをさせます。

...自身に Array のフリをさせます。

//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.is_a?(Array) # => true
file
_list.is_a?(String) # => false
end
//}...