るりまサーチ

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

別のキーワード

  1. _builtin |
  2. set |
  3. ipaddr |
  4. array |
  5. integer |

ライブラリ

クラス

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Bignum#-(other) -> Fixnum | Bignum | Float (18302.0)

算術演算子。差を計算します。

算術演算子。差を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

Fixnum#-(other) -> Fixnum | Bignum | Float (18302.0)

算術演算子。差を計算します。

算術演算子。差を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

FalseClass#|(other) -> bool (18242.0)

other が真なら true を, 偽なら false を返します。

...

|
は再定義可能な演算子に分類されていますので、通常は false | other の形で使われます。

//emlist[例][ruby]{
p false | true #=> true
p false | false #=> false
p false | nil #=> false
p false | (1 == 1) #=> true
p false | (1 + 1) #=> true

p false.|(tru...
...e) #=> true
p false.|(false) #=> false
p false.|(nil) #=> false
p false.|(1 == 1) #=> true
p false.|(1 + 1) #=> true
//}...

TrueClass#|(other) -> bool (18242.0)

常に true を返します。

...

|
は再定義可能な演算子に分類されていますので、通常は true | other のように使われます。

//emlist[例][ruby]{
p true | true #=> true
p true | false #=> true
p true | nil #=> true
p true | (1 == 1) #=> true
p true | (1 + 1) #=> true

p true.|(true)...
...#=> true
p true.|(false) #=> true
p true.|(nil) #=> true
p true.|(1 == 1) #=> true
p true.|(1 + 1) #=> true
//}...

NilClass#|(other) -> bool (18224.0)

other が真なら true を, 偽なら false を返します。

...other が真なら true を, 偽なら false を返します。

@param other 論理和を行なう式です

//emlist[例][ruby]{
nil | true # => true
nil | false # => false
nil | nil # => false
nil | "a" # => true
//}...

絞り込み条件を変える

Shell::Filter#|(filter) -> object (18218.0)

パイプ結合を filter に対して行います。

...ll.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc("-l")).to_s.chomp.to_i
puts (cat("/etc/passwd") | head("-n #{i}") | tail("-n 1")).to_s
i += 1
end
}...

Bignum#|(other) -> Fixnum | Bignum (18213.0)

ビット二項演算子。論理和を計算します。

...ビット二項演算子。論理和を計算します。

@param other 数値

1 | 1 #=> 1
2 | 3 #=> 3...

Fixnum#|(other) -> Fixnum | Bignum (18213.0)

ビット二項演算子。論理和を計算します。

...ビット二項演算子。論理和を計算します。

@param other 数値

1 | 1 #=> 1
2 | 3 #=> 3...

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

差を計算します。

...差を計算します。

@param other 自身から引く数

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

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

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

ビット二項演算子。論理和を計算します。

...ビット二項演算子。論理和を計算します。

@param other 数値

//emlist[][ruby]{
1 | 1 # => 1
2 | 3 # => 3
//}...

絞り込み条件を変える

Array#|(other) -> Array (18206.0)

集合の和演算です。両方の配列にいずれかに含まれる要素を全て含む新し い配列を返します。重複する要素は取り除かれます。

...る暗黙の型変換を試みます。

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

//emlist[例][ruby]{
[1, 1, 4, 2, 3] | [5, 4, 5] #=> [1, 4, 2, 3, 5]
//}

@see Array#&...
...暗黙の型変換を試みます。

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

//emlist[例][ruby]{
[1, 1, 4, 2, 3] | [5, 4, 5] #=> [1, 4, 2, 3, 5]
//}

@see Array#&
@see Array#union...

Date#-(x) -> Rational | Date (18202.0)

x が日付オブジェクトなら、ふたつの差を Rational で返します。単位は日です。 あるいは x が数値ならば、self より x 日前の日付を返します。

x が日付オブジェクトなら、ふたつの差を Rational で返します。単位は日です。
あるいは
x が数値ならば、self より x 日前の日付を返します。

@param x 日数、あるいは日付オブジェクト
@raise TypeError x が数値でも日付オブジェクトでもない場合に発生します。

Vector#-(v) -> Vector | Matrix (18201.0)

self からベクトル v を減じたベクトルを返します。

self からベクトル v を減じたベクトルを返します。

v には column_size が 1 の Matrix オブジェクトも指定できます。
その場合は返り値も Matrix オブジェクトになります。

@param v 減算するベクトル。減算可能な行列やベクトルを指定します。

@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。
<< 1 2 3 ... > >>