検索結果
先頭5件
-
Module
# >=(other) -> bool | nil (18237.0) -
比較演算子。self が other の先祖か同一クラスである場合、 true を返します。 self が other の子孫である場合、false を返します。
...ule#<
//emlist[例][ruby]{
module Foo; end
module Bar
include Foo
end
module Baz
prepend Foo
end
Bar.ancestors # => [Bar, Foo]
Foo >= Bar # => true
Bar >= Foo # => false
Baz.ancestors # => [Foo, Baz]
Foo >= Baz # => true
Baz >= Foo # => false
Foo >= Foo # => true
Foo >= Object # => nil
//}... -
Comparable
# >=(other) -> bool (18219.0) -
比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が正の整数か 0 を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。
...以外の整数を返した場合に、false を返します。
@param other 自身と比較したいオブジェクトを指定します。
@raise ArgumentError <=> が nil を返したときに発生します。
//emlist[例][ruby]{
1 >= 0 # => true
1 >= 1 # => true
1 >= 2 # => false
//}... -
Hash
# >=(other) -> bool (18219.0) -
other が self のサブセットか同じである場合に真を返します。
...セットか同じである場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 >= h2 # => false
h2 >= h1 # => true
h1 >= h1 # => true
//}
@see Hash#<=, Hash#<, Hash#>... -
Integer
# >=(other) -> bool (18219.0) -
比較演算子。数値として等しいまたは大きいか判定します。
...other 比較対象の数値
@return self よりも other の方が小さい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 >= 0 # => true
1 >= 1 # => true
1 >= 2 # => false
//}... -
Float
# >=(other) -> bool (18207.0) -
比較演算子。数値として等しいまたは大きいか判定します。
...ram other 比較対象の数値
@return self よりも other の方が小さい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[例][ruby]{
3.14 > 3.1415 # => false
3.14 >= 3.1415 # => false
//}... -
BigDecimal
# >=(other) -> bool (18201.0) -
self が other より大きいか等しい場合に true を、そうでない場合に false を返します。
self が other より大きいか等しい場合に true を、そうでない場合に false
を返します。 -
Complex
# >=(other) -> bool (18201.0) -
@undef
@undef -
Fixnum
# >=(other) -> bool (18201.0) -
比較演算子。数値として等しいまたは大きいか判定します。
比較演算子。数値として等しいまたは大きいか判定します。
@param other 比較対象の数値
@return self よりも other の方が小さい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。 -
Array
# none? -> bool (109.0) -
ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。
...em を評価します。
//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].none? # => true
[nil].none?... -
Array
# none? {|obj| . . . } -> bool (109.0) -
ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。
...em を評価します。
//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].none? # => true
[nil].none?... -
Array
# none?(pattern) -> bool (109.0) -
ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。
...em を評価します。
//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].none? # => true
[nil].none?...