るりまサーチ

最速Rubyリファレンスマニュアル検索!
23200件ヒット [1-100件を表示] (0.114秒)

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. float >
  4. module >
  5. complex >

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Module#>(other) -> bool | nil (18156.0)

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

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

@
param other 比較対象のモジュールやクラス

@
raise TypeError other がクラスやモジュールではない場合に発生します。

@
see Module#<

//emlist[例][ruby]{
module Awesome; end
module Included
in...
...nded
prepend Awesome
end

Included.ancestors # => [Included, Awesome]
Awesome > Included # => true
Included > Awesome # => false

Prepended.ancestors # => [Awesome, Prepended]
Awesome > Prepended # => true
Prepended > Awesome # => false

Awesome > Awesome # => false
Awesome > Object # => nil
//}...

Hash#>(other) -> bool (18132.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 # => false
//}

@
see Hash#<=, Hash#<, Hash#>=...

Comparable#>(other) -> bool (18126.0)

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

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

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

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

Integer#>(other) -> bool (18126.0)

比較演算子。数値として大きいか判定します。

...演算子。数値として大きいか判定します。

@
param other 比較対象の数値
@
return self よりも other の方が小さい場合 true を返します。
そうでなければ false を返します。

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

Float#>(other) -> bool (18120.0)

比較演算子。数値として大きいか判定します。

...として大きいか判定します。

@
param other 比較対象の数値
@
return self よりも other の方が小さい場合 true を返します。
そうでなければ false を返します。

//emlist[例][ruby]{
3.14 > 3.1415 # => false
3.14 >= 3.1415 # => false
//}...

絞り込み条件を変える

Complex#>(other) -> bool (18118.0)

@undef

...
@
undef...

Fixnum#>(other) -> bool (18114.0)

比較演算子。数値として大きいか判定します。

...比較演算子。数値として大きいか判定します。

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

Kernel$$> -> object (6208.0)

標準出力です。

...") # $stdout を /tmp/foo にリダイレクトする
puts "foo" # /tmp/foo に出力
$stdout.flush # 念のためフラッシュする
$stdout.reopen stdout_old # 元に戻す
//}

$stdout はグローバルスコープです。

@
see spec/rubycmd...

Numeric#-@ -> Numeric (6208.0)

単項演算子の - です。 self の符号を反転させたものを返します。

...単項演算子の - です。
self の符号を反転させたものを返します。

このメソッドは、二項演算子 - で 0 - self によって定義されています。


@
see Integer#-@、Float#-@、Rational#-@、Complex#-@...

String#+@ -> String | self (6208.0)

self が freeze されている文字列の場合、元の文字列の複製を返します。 freeze されていない場合は self を返します。

...n? # => false
original_text == unfrozen_text # => true
original_text.equal?(unfrozen_text) # => true

original_text = "text".freeze
unfrozen_text = +original_text
unfrozen_text.frozen? # => false
original_text == unfrozen_text # => true
original_text.e...
...qual?(unfrozen_text) # => false
//}

@
see String#-@...

絞り込み条件を変える

String#-@ -> String | self (6208.0)

self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。

...# => true
original_text == frozen_text # => true
original_text.equal?(frozen_text) # => false

original_text = "text".freeze
frozen_text = -original_text
frozen_text.frozen? # => true
original_text == frozen_text # => true
original_text.equal?(frozen_text) # => tru...
...e
//}

@
see String#+@...
<< 1 2 3 ... > >>