別のキーワード
クラス
-
Enumerator
:: ArithmeticSequence (14) -
Rake
:: FileList (24) - Range (93)
モジュール
-
Rake
:: Cloneable (24)
キーワード
- == (19)
- clone (12)
- cover? (19)
- dup (12)
- end (12)
- eql? (12)
-
exclude
_ end? (19) -
excluded
_ from _ list? (12) - last (24)
- overlap? (2)
検索結果
先頭5件
-
Rake
:: FileList # exclude(*patterns) {|entry| . . . } -> self (18174.0) -
自身から取り除くべきファイル名のパターンを自身の除外リストに登録します。
...例:
FileList['a.c', 'b.c'].exclude("a.c") # => ['b.c']
FileList['a.c', 'b.c'].exclude(/^a/) # => ['b.c']
# If "a.c" is a file, then ...
FileList['a.c', 'b.c'].exclude("a.*") # => ['b.c']
# If "a.c" is not a file, then ...
FileList['a.c', 'b.c'].exclude("a.*") # => ['a.c', 'b.c']... -
Range
# exclude _ end? -> bool (6214.0) -
範囲オブジェクトが終端を含まないとき真を返します。
...範囲オブジェクトが終端を含まないとき真を返します。
//emlist[例][ruby]{
(1..5).exclude_end? # => false
(1...5).exclude_end? # => true
//}... -
Rake
:: FileList # excluded _ from _ list?(file _ name) -> bool (6207.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")
file_list.exclude("test1.rb")
file_list.excluded_from_list?("test1.rb") # => tru......e
file_list.excluded_from_list?("test2.rb") # => false
end
//}... -
Enumerator
:: ArithmeticSequence # exclude _ end? -> bool (6202.0) -
末項(終端)を含まないとき真を返します。
末項(終端)を含まないとき真を返します。 -
Rake
:: Cloneable # dup -> object (3125.0) -
自身と同じクラスのオブジェクトを作成後、自身のインスタンス変数を 全て新たに作成したオブジェクトにコピーします。
...ます。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.freeze
dup = file_list.dup
clone = file_list.clone
dup.exclude("a.c") # => ["b.c"]
clone.exclude("a.c") # => can't modify f... -
Rake
:: Cloneable # clone -> object (3119.0) -
自身を複製します。
...ーズされています。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
clone = file_list.clone
clone # => ["a.c", "b.c"]
clone.exclude("a.c")
clone == file_list # => false... -
Range
# cover?(obj) -> bool (133.0) -
obj が範囲内に含まれている時に true を返します。
...obj が範囲内に含まれている時に true を返します。
Range#include? と異なり <=> メソッドによる演算により範囲内かどうかを判定します。
Range#include? は原則として離散値を扱い、
Range#cover? は連続値を扱います。
(数値につい......Range#exclude_end?がfalseなら「begin <= obj <= end」を、
trueなら「begin <= obj < end」を意味します。
@param obj 比較対象のオブジェクトを指定します。
//emlist[数値は連続的に扱われているため、 include? / cover? が同じ結果を返す][ruby]{
(1......1.555) # => true
//}
//emlist[String の例][ruby]{
('b'..'d').include?('d') # => true
('b'..'d').include?('ba') # => false
('b'..'d').cover?('d') # => true
('b'..'d').cover?('ba') # => true
//}
//emlist[Date, DateTime の例][ruby]{
require 'date'
(Date.today - 365 .. Date.today... -
Range
# cover?(range) -> bool (118.0) -
2.6 以降の cover? は、Range#include? や Range#=== と異なり、 引数に Range オブジェクトを指定して比較できます。
...st[引数が Range の例][ruby]{
(1..5).cover?(2..3) #=> true
(1..5).cover?(0..6) #=> false
(1..5).cover?(1...6) #=> true
//}
「(a..b).cover?(c...d)」のように終端を含まない Range オブジェクトが引数に渡されており、
「a <= c && b < d」を満たし、cが数......るために succ メソッドの呼び出しが必要な)場合、パフォーマンスの問題が起きる可能性があります。
//emlist[パフォーマンス上の問題が起きる例][ruby]{
p ('aaaaa'..'zzzzy').cover?('aaaaa'...'zzzzz') # => true
//}
@see Range#include?, Range#===... -
Range
# ==(other) -> bool (117.0) -
指定された other が Range クラスのインスタンスであり、 始端と終端が == メソッドで比較して等しく、Range#exclude_end? が同じ場合に true を返します。そうでない場合に false を返します。
...== メソッドで比較して等しく、Range#exclude_end? が同じ場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
p (1..2) == (1..2) # => true
p (... -
Range
# eql?(other) -> bool (117.0) -
指定された other が Range クラスのインスタンスであり、 始端と終端が eql? メソッドで比較して等しく、Range#exclude_end? が同じ場合に true を返します。そうでない場合に false を返します。
...eql? メソッドで比較して等しく、Range#exclude_end? が同じ場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
p (1..2).eql?(1..2) # => true...