るりまサーチ

最速Rubyリファレンスマニュアル検索!
539件ヒット [1-100件を表示] (0.026秒)
トップページ > クエリ:|[x] > ライブラリ:rake[x]

別のキーワード

  1. _builtin |
  2. set |
  3. ipaddr |
  4. array |
  5. integer |

検索結果

<< 1 2 3 ... > >>

FileUtils#sh(*cmd) {|result, status| ... } (115.0)

与えられたコマンドを実行します。

...参照してください。


例:
sh %{ls -ltr}

sh 'ls', 'file with spaces'

# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitstatus})"
end
end

@see Kernel.#exec, Kernel.#system...

Kernel#rule(*args) {|t| ... } -> Rake::Task (115.0)

自動的に作成するタスクのためのルールを定義します。

...自動的に作成するタスクのためのルールを定義します。

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

例:
rule '.o' => '.c' do |t|
sh %{cc -o #{t.name} #{t.source}}
end...

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

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

...uby]{
# 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 = FileList.new('sample*')
file_list.egrep(/line/) # => 7

file_list.egrep(/.*/) do |filena...
...me, 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 = sample1, count = 3, line = line3\n"
# => "filename = sample2, count = 1, line = line1\...

Rake::FileList.new(*patterns) {|self| ... } (115.0)

与えられたパターンをもとにして自身を初期化します。

...いる場合は、自身をブロックパラメータとしてブロックを評価します。

@param patterns パターンを指定します。

例:
file_list = FileList.new('lib/**/*.rb', 'test/test*.rb')

pkg_files = FileList.new('lib/**/*') do |fl|
fl.exclude(/\bCVS\b/)
end...

Rake::FileTask#timestamp -> Time | Rake::LateTime (115.0)

ファイルタスクのタイムスタンプを返します。

...ファイルタスクのタイムスタンプを返します。

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

task default: "test.txt"
file "test.txt" do |task|
Rake
.application.options.build_all = false
task.timestamp # => #<Rake::LateTime:0x2ba58f0>
end
//}...

絞り込み条件を変える

Rake::TaskManager#lookup(task_name, initial_scope = nil) -> Rake::Task | nil (115.0)

与えられたタスク名にマッチするタスクを検索します。

...名を指定します。

@param initial_scope 検索するスコープを指定します。

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

task default: :test_rake_app

task :test_rake_app do |task|
task.application.lookup("test_rake_app") # => <Rake::Task test_rake_app => []>
end
//}...

Rake::TaskManager#synthesize_file_task(task_name) -> Rake::FileTask | nil (115.0)

与えられたタスク名をもとにファイルタスクを合成します。

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

task default: :test_rake_app

task :test_rake_app do |task|
task.application.synthesize_file_task("sample_file") # => nil
IO.write("sample_file", "")
task.application.synthesize_file_task("sample_file") # => <Rake::FileTask sample_file =...

Rake::PackageTask.new(name = nil, version = nil) {|t| ... } -> Rake::PackageTask (114.0)

自身を初期化してタスクを定義します。

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

Rake
::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir = "./pkg"
package_task.package_files.include("lib/**/*")
end

# rake -T を実行すると以下になる
# => rake clobber_package...
...# Remove package products
# rake package # Build all the packages
# rake repackage # Force a rebuild of the package files
//}...

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

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

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

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

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

@see Kernel.#sh

Rake::FileList#*(other) -> Array | String (103.0)

Array#* と動作を合わせるために再定義しています。

Array#* と動作を合わせるために再定義しています。


@see Array#*

絞り込み条件を変える

<< 1 2 3 ... > >>