るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Time#-(sec) -> Time (18247.0)

自身より sec 秒だけ前の時刻を返します。

...り sec 秒だけ前の時刻を返します。

@param sec 実数を秒を単位として指定します。

//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t2 - 2592000 # => 2000-01-01 00:00:00 +0900
//}...

Time#-(time) -> Float (18237.0)

自身と time との時刻の差を Float で返します。単位は秒です。

...します。単位は秒です。

@param time 自身との差を算出したい Time オブジェクトを指定します。

//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t2 - t # => 2592000.0
//}...

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

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

...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 (18218.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#>=...

Array#-(other) -> Array (18212.0)

自身から other の要素を取り除いた配列を生成して返します。

...換を試みます。

@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
[1, 2, 1, 3, 1, 4] - [4, 2] # => [1, 1, 3, 1]

[1, 2, 1, 3, 1, 4] - [1, 4] # => [2, 3]
//}...
...@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
[1, 2, 1, 3, 1, 4] - [4, 2] # => [1, 1, 3, 1]

[1, 2, 1, 3, 1, 4] - [1, 4] # => [2, 3]
//}


@see Array#difference...

絞り込み条件を変える

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

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

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

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

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

Complex#-(other) -> Complex (18212.0)

差を計算します。

...差を計算します。

@param other 自身から引く数

//emlist[例][ruby]{
Complex(1, 2) - Complex(2, 3) # => (-1-1i)
//}...

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

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

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

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

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

Rational#-(other) -> Rational | Float (18212.0)

差を計算します。

...差を計算します。

@param other 自身から引く数

other に Float を指定した場合は、計算結果を Float で返しま
す。

//emlist[例][ruby]{
r = Rational(3, 4)
r - 1 # => (-1/4)
r - 0.5 # => 0.25
//}...

Shell::Filter#>(to) -> self (18212.0)

toをフィルタの出力とする。 toが, 文字列ならばファイルに, IOオブジェクトであれ ばそれをそのまま出力とする。

...ルに,IOオブジェクトならばそれに出力します。

使用例
require 'shell'
Shell.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") > File.open("tail.out", "w")
#(sh.tail("-n 3") < "/etc/passwd") > "tail.out" # と同じ.
}...

絞り込み条件を変える

<< 1 2 3 ... > >>