96件ヒット
[1-96件を表示]
(0.088秒)
ライブラリ
- ビルトイン (12)
- pathname (36)
- rake (36)
-
rake
/ packagetask (12)
クラス
- Object (12)
- Pathname (36)
-
Rake
:: PackageTask (12)
モジュール
-
Rake
:: TaskManager (36)
キーワード
- delete (12)
-
in
_ namespace (12) - intern (12)
-
respond
_ to _ missing? (12) - split (12)
-
synthesize
_ file _ task (12) - unlink (12)
検索結果
先頭5件
-
Rake
:: PackageTask # name -> String (18226.0) -
バージョン情報を含まないパッケージの名前を返します。
...バージョン情報を含まないパッケージの名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.name # => "sample"
end
//}... -
Rake
:: TaskManager # in _ namespace(name) {|name _ space| . . . } -> Array (6427.0) -
与えられた名前の名前空間でブロックを評価します。
...を評価します。
@param name 名前を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
namespace :sample do
def hoge
puts "hoge"
end
end
task :test_rake_app do
task.application.in_namespace("sample") do
hoge # => "hoge"
e... -
Pathname
# split -> Array (3119.0) -
File.split(self.to_s) と同じです。
...File.split(self.to_s) と同じです。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}
@see File.split... -
Pathname
# delete -> Integer (3113.0) -
self が指すディレクトリあるいはファイルを削除します。
...self が指すディレクトリあるいはファイルを削除します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}... -
Pathname
# unlink -> Integer (3113.0) -
self が指すディレクトリあるいはファイルを削除します。
...self が指すディレクトリあるいはファイルを削除します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}... -
Rake
:: TaskManager # synthesize _ file _ task(task _ name) -> Rake :: FileTask | nil (238.0) -
与えられたタスク名をもとにファイルタスクを合成します。
...与えられたタスク名をもとにファイルタスクを合成します。
@param task_name タスク名を指定します。
@return 与えられたタスク名と同名のファイルが存在する場合は、ファイルタスクを作成して返します。
そうでない場....../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
:: TaskManager # intern(task _ class , task _ name) -> Rake :: Task (226.0) -
タスクを検索します。
..._name タスクの名前を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.application.intern(Rake::Task, "test_rake_app") # => <Rake::Task test_rake_app => []>
task.application.intern(Rake::Task, "sample......_task") # => <Rake::Task sample_task => []>
end
//}... -
Object
# respond _ to _ missing?(symbol , include _ private) -> bool (185.0) -
自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。
...e private method も含めたい場合に true が渡されます
//emlist[例][ruby]{
class Sample
def method_missing(name, *args)
if name =~ /^to_*/
[name, *args] # => [:to_sample, "sample args1", "sample args2"]
return
else
super
end
end
def respond_to_missin......g?(sym, include_private)
(sym =~ /^to_*/) ? true : super
end
end
s = Sample.new
s.to_sample("sample args1", "sample args2")
s.respond_to?(:to_sample) # => true
s.respond_to?(:sample) # => false
//}
@see Object#respond_to?, BasicObject#method_missing...