るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

モジュール

キーワード

検索結果

<< 1 2 3 > >>

FileUtils#ruby(*args) {|result, status| ... } (30461.0)

与えられた引数で Ruby インタプリタを実行します。

...与えられた引数で Ruby インタプリタを実行します。

@param args Ruby インタプリタに与える引数を指定します。

例:
ruby
%{-pe '$_.upcase!' <README}

@see Kernel.#sh...

Rake::TaskManager#create_rule(*args) { ... } (12215.0)

与えられたパラメータに従ってルールを作成します。

...aram args ルールに与えるパラメータを指定します。

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

task default: :test_rake_app
task :test_rake_app do
r
ule = Rake.application.create_rule '.txt' => '.md' do |t|
"#{t}"
end
p rule # => 0x0000558dd2e32d20 /path/to/Rake...

Rake::PackageTask#package_dir_path -> String (12214.0)

パッケージに含むファイルを配置するディレクトリを返します。

...パッケージに含むファイルを配置するディレクトリを返します。

//emlist[][ruby]{
# Rakefile での記載例とする
r
equire 'rake/packagetask'

Rake
::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir_path # => "pkg/sample-1.0.0"
end
//}...

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

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

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

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

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

Rake::Application#original_dir -> String (9215.0)

rake コマンドを実行したディレクトリを返します。

...
rake
コマンドを実行したディレクトリを返します。

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

task default: :test_rake_app
task :test_rake_app do
Rake
.application.original_dir # => "/path/to/dir"
end
//}...

絞り込み条件を変える

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...

Rake::Application#add_loader(ext, loader) (9115.0)

与えられた拡張子で終わるファイル名のファイルをロードするためのローダーを 自身に追加します。

...

@param ext 拡張子を指定します。

@param loader ローダーを指定します。

//emlist[例][ruby]{
r
equire "rake/loaders/makefile"

# Rakefile での記載例とする

task default: :test
task :test

makefile =<<-EOS
<< <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
EOS
IO.write("sampl...
...e.mf", makefile)
Rake
.application.add_loader("mf", Rake::MakefileLoader.new)
Rake
.application.add_import("sample.mf")
Rake
::Task.task_defined?("a") # => false
Rake
.application.load_imports
Rake
::Task.task_defined?("a") # => true
//}...

Rake::InvocationChain#member?(task_name) -> bool (9115.0)

与えられたタスク名が自身に含まれる場合は真を返します。 そうでない場合は偽を返します。

...aram task_name タスク名を指定します。

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

task default: :test_rake_app
task :test_rake_app do
invocation_chain = Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.member?("task_a") # => true
invocat...
...ion_chain.member?("task_b") # => false
end
//}...

Rake::FileList#egrep(pattern) {|filename, count, line| ... } (6215.0)

与えられたパターンをファイルリストから grep のように検索します。

...与えられたパターンをファイルリストから grep のように検索します。

ブロックが与えられた場合は、マッチした行の情報 (ファイル名、行番号、マッチした行) が
ブロックに渡されてブロックが評価されます。ブロックが...
...を出力します。

@param pattern 正規表現を指定します。

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

IO.write("sample1", "line1\nline2\nline3\n")
IO.write("sample2", "line1\nline2\nline3\nline4\n")

task default: :test_rake_app
task :test_rake_app do

file_list = FileLis...
...t.new('sample*')
file_list.egrep(/line/) # => 7

file_list.egrep(/.*/) do |filename, count, line|
"filename = #{filename}, count = #{count}, line = #{line}"
end
end

# => "filename = sample1, count = 1, line = line1\n"
# => "filename = sample1, count = 2, line = line2\n"
# => "filename = s...
<< 1 2 3 > >>