るりまサーチ

最速Rubyリファレンスマニュアル検索!
1613件ヒット [1-100件を表示] (0.193秒)
トップページ > クエリ:l[x] > クエリ:>[x] > クエリ:range[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. $-l kernel

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Net::HTTPHeader#range -> Range|nil (18464.0)

Range: ヘッダの示す範囲を Range オブジェクトで返します。

...
Range
: ヘッダの示す範囲を Range オブジェクトで返します。

ヘッダにない場合は nil を返します。

@raise Net::HTTPHeaderSyntaxError Range:ヘッダの中身が規格通り
でない場合に発生します。

//emlist[例 正常な...
...le.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['range'] = "bytes=1-5"
req.range # => [1..5]
//}

//emlist[例 Net::HTTPHeaderSyntaxError][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['range'] = "inval...
...id"
req.range # => Net::HTTPHeaderSyntaxError
//}...

WEBrick::HTTPServlet::DefaultFileHandler#prepare_range(range, filesize) -> [Integer, Integer] (15408.0)

WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content で利用する範囲情報を生成して返します。

...WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content で利用する範囲情報を生成して返します。

@param range 2 要素の配列を指定します。

@param filesize ファイルサイズを指定します。...

Range#eql?(other) -> bool (15238.0)

指定された other が Range クラスのインスタンスであり、 始端と終端が eql? メソッドで比較して等しく、Range#exclude_end? が同じ場合に true を返します。そうでない場合に false を返します。

...指定された other が Range クラスのインスタンスであり、
始端と終端が eql? メソッドで比較して等しく、Range#exclude_end? が同じ場合に
true を返します。そうでない場合に false を返します。

@param other 自身と比較したいオブジェ...
...クトを指定します。

//emlist[例][ruby]{
p (1..2).eql?(1..2) # => true
p (1..2).eql?(1...2) # => false
p (1..2).eql?(Range.new(1.0, 2.0)) # => false
//}...

Range#include?(obj) -> bool (15224.0)

obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。

...返します。
そうでない場合は、false を返します。


<=> メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。

始端・終端・引数が数値であれば、 Range#cover? と同様の動きをします。

@para...
...指定します。

//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?("B") # => false
p ("a" .. "c").include?("ba") # => false
p ("a" .. "c").cover?("ba") # => true

p (1 .. 3).include?(1.5) # => true
//}

@see d:spec/control#case
@see Range#cover?, Range#===...

Range#exclude_end? -> bool (15200.0)

範囲オブジェクトが終端を含まないとき真を返します。

...範囲オブジェクトが終端を含まないとき真を返します。

//emlist[例][ruby]{
(1..5).exclude_end? # => false
(1...5).exclude_end? # => true
//}...

絞り込み条件を変える

Net::HTTPHeader#range_length -> Integer|nil (12335.0)

Content-Range: ヘッダフィールドの表している長さを整数で返します。

...Content-Range: ヘッダフィールドの表している長さを整数で返します。

ヘッダが設定されていない場合には nil を返します。

@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である...
...発生します。


//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['Content-Range'] = "bytes 1-500/1000"
req.range_length # => 500
//}...

Range#include?(obj) -> bool (12224.0)

obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。

...場合は、false を返します。

Range
#=== は主に case 式での比較に用いられます。

<=> メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。

始端・終端・引数が数値であれば、 Range#cover? と同...
...クトを指定します。

//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?("B") # => false
p ("a" .. "c").include?("ba") # => false
p ("a" .. "c").cover?("ba") # => true

p (1 .. 3).include?(1.5) # => true
//}

@see d:spec/control#case
@see Range#cover?...

Range#member?(obj) -> bool (12224.0)

obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。

...返します。
そうでない場合は、false を返します。


<=> メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。

始端・終端・引数が数値であれば、 Range#cover? と同様の動きをします。

@para...
...指定します。

//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?("B") # => false
p ("a" .. "c").include?("ba") # => false
p ("a" .. "c").cover?("ba") # => true

p (1 .. 3).include?(1.5) # => true
//}

@see d:spec/control#case
@see Range#cover?, Range#===...

Range#last(n) -> [object] (12213.0)

最後の n 要素を返します。範囲内に要素が含まれない場合は空の配列を返します。

...引数を省略して実行した場合は、終端を含むかどうか
(Range#exclude_end? の戻り値)に関わらず終端の要素を返す事に注意し
てください。

//emlist[例][ruby]{
(10..20).last(3) # => [18, 19, 20]
(10...20).last(3) # => [17, 18, 19]
//}

@see Range#first...

Range#last -> object (12208.0)

終端の要素を返します。範囲オブジェクトが終端を含むかどうかは関係ありま せん。

...終端の要素を返します。範囲オブジェクトが終端を含むかどうかは関係ありま
せん。

//emlist[例][ruby]{
(10..20).last # => 20
(10...20).last # => 20
//}

@see Range#begin...

絞り込み条件を変える

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

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

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

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

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