るりまサーチ

最速Rubyリファレンスマニュアル検索!
819件ヒット [1-100件を表示] (0.158秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:<=[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

検索結果

<< 1 2 3 ... > >>

Comparable#<=(other) -> bool (21318.0)

比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が負の整数か 0 を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。

... <=> をもとにオブジェクト同士を比較します。
<=
> が負の整数か 0 を返した場合に、true を返します。
それ以外の整数を返した場合に、false を返します。

@param other 自身と比較したいオブジェクトを指定します。
@raise Argume...
...ntError <=> が nil を返したときに発生します。

//emlist[例][ruby]{
1 <= 0 # => false
1 <= 1 # => true
1 <= 2 # => true
//}...

Integer#<=(other) -> bool (21318.0)

比較演算子。数値として等しいまたは小さいか判定します。

...param other 比較対象の数値
@return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 <= 0 # => false
1 <= 1 # => true
1 <= 2 # => true...

Module#<=(other) -> bool | nil (18336.0)

比較演算子。self が other の子孫であるか、self と other が 同一クラスである場合、 true を返します。 self が other の先祖である場合、false を返します。

...子。self が other の子孫であるか、self と other
同一クラスである場合、 true を返します。
self が other の先祖である場合、false を返します。

継承関係にないクラス同士の比較では
nil を返します。

@param other 比較対象のモジ...
...@raise TypeError other がクラスやモジュールではない場合に発生します。

@see Module#<

//emlist[例][ruby]{
module Foo; end
module Bar
include Foo
end
module Baz
prepend Foo
end

Bar.ancestors # => [Bar, Foo]
Foo <= Bar # => false
Bar <= Foo # => true

Baz.ancestors # =>...
...[Foo, Baz]
Foo <= Baz # => false
Baz <= Foo # => true

Foo <= Foo # => true
Foo <= Object # => nil
//}...

Hash#<=(other) -> bool (18318.0)

self が other のサブセットか同じである場合に真を返します。

...self が other のサブセットか同じである場合に真を返します。

@param other 自身と比較したい Hash オブジェクトを指定します。

//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 <= h2 # => true
h2 <= h1 # => false
h1 <= h1 # => true
//}

@see...

Float#<=(other) -> bool (18306.0)

比較演算子。数値として等しいまたは小さいか判定します。

...@param other 比較対象の数値
@return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[例][ruby]{
3.14 < 3.1415 # => true
3.14 <= 3.1415 # => true
//...

絞り込み条件を変える

BigDecimal#<=(other) -> bool (18300.0)

self が other より小さいか等しい場合に true を、そうでない場合に false を返します。

...self が other より小さいか等しい場合に true を、そうでない場合に false
を返します。...

Complex#<=(other) -> bool (18300.0)

@undef

@undef

Fixnum#<=(other) -> bool (18300.0)

比較演算子。数値として等しいまたは小さいか判定します。

...演算子。数値として等しいまたは小さいか判定します。

@param other 比較対象の数値
@return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。...

String#<=>(other) -> -1 | 0 | 1 | nil (9335.0)

self と other を ASCII コード順で比較して、 self が大きい時には 1、等しい時には 0、小さい時には -1 を返します。 このメソッドは Comparable モジュールのメソッドを実装するために使われます。

...ther を ASCII コード順で比較して、
self が大きい時には 1、等しい時には 0、小さい時には -1 を返します。
このメソッドは Comparable モジュールのメソッドを実装するために使われます。

other が文字列でない場合、
other.to_str...
...other.<=> が定義されていれば
0 - (other <=> self) の結果を返します。
そうでなければ nil を返します。

@param other 文字列
@return 比較結果の整数か nil

//emlist[例][ruby]{
p "aaa" <=> "xxx" # => -1
p "aaa" <=> "aaa" # => 0
p "xxx" <=> "aaa"...
...# => 1

p "string" <=> "stringAA" # => -1
p "string" <=> "string" # => 0
p "stringAA" <=> "string" # => 1
//}...

Integer#<=>(other) -> -1 | 0 | 1 | nil (9329.0)

self と other を比較して、self が大きい時に1、等しい時に 0、小さい時 に-1、比較できない時に nil を返します。

...her を比較して、self が大きい時に1、等しい時に 0、小さい時
-1、比較できない時に nil を返します。

@param other 比較対象の数値
@return -1 か 0 か 1 か nil のいずれか

//emlist[][ruby]{
1 <=> 2 # => -1
1 <=> 1 # => 0
2 <=> 1 # => 1
2 <=>...

絞り込み条件を変える

<< 1 2 3 ... > >>