るりまサーチ

最速Rubyリファレンスマニュアル検索!
110件ヒット [1-100件を表示] (0.016秒)
トップページ > クエリ:Range[x] > クエリ:range[x] > 種類:特異メソッド[x]

別のキーワード

  1. range max
  2. range min
  3. net/http set_range
  4. httpheader set_range
  5. range step

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

Range.new(first, last, exclude_end = false) -> Range (30263.0)

first から last までの範囲オブジェクトを生成して返しま す。

...mlist[例: 整数の範囲オブジェクトの場合][ruby]{
Range
.new(1, 10) # => 1..10
Range
.new(1, 10, true) # => 1...10
//}

//emlist[例: 日付オブジェクトの範囲オブジェクトの場合][ruby]{
require 'date'
Range
.new(Date.today, Date.today >> 1).each {|d| puts d }
# => 201...
...7-09-16
# 2017-09-17
# ...
# 2017-10-16
//}

//emlist[例: IPアドレスの範囲オブジェクトの場合][ruby]{
require 'ipaddr'
Range
.new(IPAddr.new("192.0.2.1"), IPAddr.new("192.0.2.3")).each {|ip| puts ip}
# => 192.0.2.1
# 192.0.2.2
# 192.0.2.3
//}

//emlist[例: 自作のオ...
...ブジェクトの場合][ruby]{
MyInteger = Struct.new(:value) do
def succ
self.class.new(value + 1)
end

def <=>(other)
value <=> other.value
end

def to_s
value.to_s
end
end
Range
.new(MyInteger.new(1), MyInteger.new(3)).each {|i| puts i }
# => 1
# 2
# 3
//}...

Range.json_create(hash) -> Range (30203.0)

JSON のオブジェクトから Ruby のオブジェクトを生成して返します。

JSON のオブジェクトから Ruby のオブジェクトを生成して返します。

@param hash 適切なキーを持つハッシュを指定します。

OpenSSL::BN.pseudo_rand_range(range) -> OpenSSL::BN (12461.0)

乱数を 0 から range-1 までの間で生成し、返します。

...を 0 から range-1 までの間で生成し、返します。

乱数系列に暗号論的な強さはありません。

@param range 生成する乱数の範囲
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.pseudo_rand, OpenSSL::BN.rand_range...

OpenSSL::BN.rand_range(range) -> OpenSSL::BN (12461.0)

暗号論的に強い擬似乱数を 0 から range-1 までの間で生成し、返します。

...暗号論的に強い擬似乱数を 0 から range-1 までの間で生成し、返します。

@param range 生成する乱数の範囲
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.rand, OpenSSL::BN.pseudo_rand_range...

Random.rand(range) -> Integer | Float (239.0)

擬似乱数を発生させます。

...

@param max 乱数値の上限を正の整数または実数で指定します。
@param range 発生させる乱数値の範囲を Range オブジェクトで指定します。
range
の境界は数値でなければなりません。

@raise Errno::EDOM rand(1..Float::INFINITY)...

絞り込み条件を変える

Random.rand -> Float (39.0)

擬似乱数を発生させます。

...

@param max 乱数値の上限を正の整数または実数で指定します。
@param range 発生させる乱数値の範囲を Range オブジェクトで指定します。
range
の境界は数値でなければなりません。

@raise Errno::EDOM rand(1..Float::INFINITY)...

Random.rand(max) -> Integer | Float (39.0)

擬似乱数を発生させます。

...

@param max 乱数値の上限を正の整数または実数で指定します。
@param range 発生させる乱数値の範囲を Range オブジェクトで指定します。
range
の境界は数値でなければなりません。

@raise Errno::EDOM rand(1..Float::INFINITY)...

JSON.create_id=(identifier) (25.0)

json_create メソッドで使用するクラスを決定するために使用する値をセットします。

...# => "json_class"
puts (1..5).to_json # => {"json_class":"Range","a":[1,5,false]}
JSON.create_id = "my_json_class" # => "my_json_class"
JSON.create_id # => "my_json_class"
puts (1..5).to_json # => {"my_json_class":"Range","a":[1,5,false]}
//}...

OpenSSL::BN.pseudo_rand(bits, fill=0, odd=false) -> OpenSSL::BN (13.0)

乱数を生成し、返します。

...@param bits 発生させる数のビット数
@param fill 上位ビットの性質を決める整数
@param odd 真なら発生させる数は奇数のみとなる
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.rand, OpenSSL::BN.pseudo_rand_range...

OpenSSL::BN.rand(bits, fill=0, odd=false) -> OpenSSL::BN (13.0)

暗号論的に強い擬似乱数を生成し、返します。

...@param bits 発生させる数のビット数
@param fill 上位ビットの性質を決める整数
@param odd 真なら発生させる数は奇数のみとなる
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.pseudo_rand, OpenSSL::BN.rand_range...

絞り込み条件を変える

<< 1 2 > >>