るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
4件ヒット [1-4件を表示] (0.038秒)
トップページ > クエリ:IO[x] > バージョン:2.5.0[x] > クエリ:test[x] > クエリ:top_level[x]

別のキーワード

  1. kernel test
  2. _builtin test
  3. rubygems/test_utilities tempio
  4. rubygems/test_utilities fetcher=
  5. testtask test_files=

ライブラリ

クラス

モジュール

キーワード

検索結果

Rake::Application#top_level (63430.0)

Rake アプリケーションに与えられたトップレベルのタスク (コマンドラインで指定されたタスク) を実行します。

Rake アプリケーションに与えられたトップレベルのタスク
(コマンドラインで指定されたタスク) を実行します。

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

task default: :test1
task :test1
task :test2 do
puts "test2"
end

# rake test2 で実行
Rake.application.top_level

# => "test2"
//}

Rake::Application#top_level_tasks -> Array (27358.0)

コマンドラインで指定されたタスクのリストを返します。

コマンドラインで指定されたタスクのリストを返します。

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

task default: :test_rake_app
task :test_rake_app do
Rake.application.top_level_tasks # => ["default"]
end
//}

Rake.application -> Rake::Application (18727.0)

現在の Rake アプリケーションを返します。

現在の Rake アプリケーションを返します。

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

require 'pp'

task default: :test_rake_app
task :test_rake_app do
pp Rake.application
end

# => #<Rake::Application:0x31b0f18
# @default_loader=#<Rake::DefaultLoader:0x31b0c78>,
# @imported=[],
# @last_description=nil,
# ...

Rake.application=(app) (18373.0)

現在の Rake アプリケーションをセットします。

現在の Rake アプリケーションをセットします。

@param app Rake::Application のインスタンスを指定します。

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

require 'pp'

task default: :test_rake_app
task :test_rake_app do
app = Rake::Application.new
app.tty_output = true
Rake.application = app
pp Rake.application
end

# => #<Rake::App...