るりまサーチ (Ruby 2.2.0)

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

検索結果

Rake::InvocationChain.new(task_name, tail) (63346.0)

与えられたタスク名と一つ前の Rake::InvocationChain を用いて自身を初期化します。

...前の Rake::InvocationChain を用いて自身を初期化します。

@param task_name タスク名を指定します。

@param tail 一つ前の Rake::InvocationChain を指定します。

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

task default: :test_rake_app
task :test_rake_app d...
...o
tail = Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
tail.to_s # => "TOP => task_a"
b = Rake::InvocationChain.new("task_b", tail)
b.to_s # => "TOP => task_a => task_b"
end
//}...

Rake::PackageTask.new(name = nil, version = nil) {|t| ... } -> Rake::PackageTask (54625.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
//}...

Rake.application=(app) (18343.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::Application:0x00005624e6c30eb8
# @default_loader=#<Rake::DefaultLoader:0x00005624e6c30cd8>,
# @imported=[],
# @last_description=nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x00005624e6c30bc0>,
#...
...".rf"=>#<Rake::DefaultLoader:0x00005624e6c30b48>,
# ".rake"=>#<Rake::DefaultLoader:0x00005624e6c30a80>},
# @name="rake",
# @options=
# #<OpenStruct always_multitask=false, backtrace=false, build_all=false, dryrun=false, ignore_deprecate=false, ignore_system=false, job_stats=...

Rake::InvocationChain#append(task_name) -> Rake::InvocationChain (9325.0)

与えられたタスク名を追加して新しい Rake::InvocationChain を返します。

...しい Rake::InvocationChain を返します。

@param task_name 追加するタスク名を指定します。

@raise RuntimeError 循環したタスクの呼び出しを検出した場合に発生します。

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

task default: :test_rake_app
tas...
...k :test_rake_app do
invocation_chain= Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.append("task_b") # => LL("task_b", "task_a")
end
//}...

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

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

...e "rake/loaders/makefile"

# Rakefile での記載例とする

task default: :test
task :test

makefile =<<-EOS
<< <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
EOS
IO.write("sample.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 (9025.0)

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

...

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

Rake::InvocationChain#to_s -> String (9025.0)

トップレベルのタスクから自身までの依存関係を文字列として返します。

...での依存関係を文字列として返します。

//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.to_s # => "TOP => task_a"
end
//...

Rake::FileList#ext(newext = &#39;&#39;) -> Rake::FileList (361.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"...

Rake::FileList#resolve -> self (79.0)

追加リストと除外リストを評価します。

...ストと除外リストを評価します。

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

IO.write("test.rb", "test")
IO.write("test.java", "test")
IO.write("test.js", "test")

task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("*.rb")
file_list.include("*....

Rake::PackageTask#package_files=(file_list) (76.0)

パッケージに含むファイルリストを設定します。

...

@param file_list ファイルリストを指定します。

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

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

Rake
::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_files # =>...

絞り込み条件を変える

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

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

...attern 正規表現を指定します。

//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 = FileList.new('sample*')
file_list.eg...

Rake::FileList#excluded_from_list?(file_name) -> bool (61.0)

与えられたファイル名が除外される場合は、真を返します。 そうでない場合は偽を返します。

...

@param file_name ファイル名を指定します。

//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")
file_list.exclude("te...

Rake::FileList#existing -> Rake::FileList (61.0)

自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含む Rake::FileList を返します。

...ステムに存在するファイルのみを
含む 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....

Rake::FileList#existing! -> self (61.0)

自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含むように自身を変更して返します。

...みを
含むように自身を変更して返します。

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

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

自身に含まれるファイルリストのそれぞれのエントリに対して 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...

絞り込み条件を変える

Rake::FileList#import(array) -> self (61.0)

与えられた配列を自身にインポートします。

...param array ファイル名のリストを指定します。

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

Rake::MakefileLoader#load(filename) (58.0)

与えられた Makefile をロードします。

...します。

@param filename 読み込む Makefile の名前を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする
require "rake/loaders/makefile"

task default: :test_rake_app

open "sample.mf", "w" do |io|
io << <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
b: b1 b2 b3 \
b4...
...a6 a7
c: c1
d: d1 d2 \
e f : e1 f1
g\ 0: g1 g\ 2 g\ 3 g4
SAMPLE_MF
end

task :test_rake_app do |task|
loader = Rake::MakefileLoader.new
loader.load("sample.mf")
p Rake::Task.task_defined?("a") # => true
p Rake::Task.tasks[0] # => <Rake::FileTask a => [a1, a2, a3, a4, a5, a6, a7]>
end
//}...

Rake::PackageTask#package_files -> Rake::FileList (58.0)

パッケージに含むファイルリストを返します。

...パッケージに含むファイルリストを返します。

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

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

Rake
::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_files # =>...