るりまサーチ

最速Rubyリファレンスマニュアル検索!
722件ヒット [501-600件を表示] (0.080秒)
トップページ > クエリ:Ruby[x] > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:-[x] > クエリ:@[x] > クラス:Integer[x]

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< < ... 4 5 6 7 8 > >>

Integer#<(other) -> bool (126.0)

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

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

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

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

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

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

...小さいか判定します。

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

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

Integer#==(other) -> bool (126.0)

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

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

@
param other 比較対象の数値
@
return self と other が等しい場合 true を返します。
そうでなければ false を返します。

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

Integer#===(other) -> bool (126.0)

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

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

@
param other 比較対象の数値
@
return self と other が等しい場合 true を返します。
そうでなければ false を返します。

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

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

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

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

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

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

絞り込み条件を変える

Integer#>=(other) -> bool (126.0)

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

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

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

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

Integer#gcdlcm(n) -> [Integer] (126.0)

自身と整数 n の最大公約数と最小公倍数の配列 [self.gcd(n), self.lcm(n)] を返します。

...

@
raise ArgumentError n に整数以外のものを指定すると発生します。

//emlist[][ruby]{
2.gcdlcm(2) # => [2, 2]
3.gcdlcm(-7) # => [1, 21]
((1<<31)-1).gcdlcm((1<<61)-1) # => [1, 4951760154835678088235319297]
//}

@
see Integer#gcd, Integer#lcm...

Integer#times -> Enumerator (126.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...self - 1 までの数値が渡されます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@
see Integer#upt...

Integer#times {|n| ... } -> self (126.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...self - 1 までの数値が渡されます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@
see Integer#upt...
<< < ... 4 5 6 7 8 > >>