394件ヒット
[301-394件を表示]
(0.126秒)
ライブラリ
- ビルトイン (106)
- pathname (36)
- rake (60)
-
rake
/ loaders / makefile (12) -
rake
/ packagetask (180)
クラス
- Array (48)
- NameError (10)
- Object (12)
- Pathname (36)
-
Rake
:: Application (12) -
Rake
:: FileList (12) -
Rake
:: MakefileLoader (12) -
Rake
:: PackageTask (180) - Random (36)
モジュール
-
Rake
:: TaskManager (36)
キーワード
-
add
_ loader (12) - delete (12)
- egrep (12)
-
in
_ namespace (12) - intern (12)
- load (12)
- name (12)
- name= (12)
-
need
_ tar (12) -
need
_ tar= (12) -
need
_ tar _ bz2 (12) -
need
_ tar _ bz2= (12) -
need
_ tar _ gz (12) -
need
_ tar _ gz= (12) -
need
_ zip (12) -
need
_ zip= (12) -
package
_ dir (12) -
package
_ dir= (12) -
package
_ dir _ path (12) -
package
_ files (12) -
package
_ files= (12) - rand (36)
- receiver (10)
-
respond
_ to _ missing? (12) - split (12)
-
synthesize
_ file _ task (12) - unlink (12)
検索結果
先頭5件
-
Rake
:: FileList # egrep(pattern) {|filename , count , line| . . . } (3161.0) -
与えられたパターンをファイルリストから 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 = FileList.new('sample*')
fi......*/) 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 = sample1, count = 3, line = line3\n"
# => "filename = sample2, count = 1,......line = line1\n"
# => "filename = sample2, count = 2, line = line2\n"
# => "filename = sample2, count = 3, line = line3\n"
# => "filename = sample2, count = 4, line = line4\n"
//}... -
Pathname
# split -> Array (3113.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... -
Rake
:: PackageTask # need _ zip=(flag) (3107.0) -
zip ファイル (tgz) を作成するかどうかを設定します。
...します。
@param flag 真または偽を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.need_zip # => false
package_task.need_zip = true
package_task.need_zip # =>... -
NameError
# receiver -> object (3019.0) -
self が発生した時のレシーバオブジェクトを返します。
...lf が発生した時のレシーバオブジェクトを返します。
例:
class Sample
def foo
return "foo"
end
end
bar = Sample.new
begin
bar.bar
rescue NameError => err
p err.receiver # => #<Sample:0x007fd4d89b3110>
p err.receiver.foo # => "foo"
end... -
Pathname
# delete -> Integer (3007.0) -
self が指すディレクトリあるいはファイルを削除します。
...self が指すディレクトリあるいはファイルを削除します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}... -
Pathname
# unlink -> Integer (3007.0) -
self が指すディレクトリあるいはファイルを削除します。
...self が指すディレクトリあるいはファイルを削除します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}... -
Rake
:: PackageTask # need _ zip -> bool (3007.0) -
この値が真である場合は zip ファイルを作成します。 デフォルトは偽です。
...この値が真である場合は zip ファイルを作成します。
デフォルトは偽です。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.need_zip # => false
end
//}... -
Object
# respond _ to _ missing?(symbol , include _ private) -> bool (161.0) -
自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。
...表されるメソッドに対し
BasicObject#method_missing で反応するつもりならば真を返します。
Object#respond_to? はメソッドが定義されていない場合、
デフォルトでこのメソッドを呼びだし問合せます。
BasicObject#method_missing を override......false を返します。
@param symbol メソッド名シンボル
@param include_private 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_missing?(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
//}...