573件ヒット
[1-100件を表示]
(0.182秒)
種類
- インスタンスメソッド (355)
- 特異メソッド (165)
- 文書 (22)
- 定数 (22)
- 関数 (9)
クラス
-
ARGF
. class (11) -
CSV
:: Row (22) - DateTime (88)
-
Encoding
:: Converter (33) - Enumerator (22)
-
Enumerator
:: Lazy (10) -
Fiddle
:: Pointer (22) - IO (117)
- MatchData (26)
-
Net
:: FTP (44) - Pathname (22)
-
Psych
:: SyntaxError (11) - Regexp (22)
- Socket (11)
- String (4)
- Time (44)
モジュール
- Enumerable (22)
-
Socket
:: Constants (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
IPV6
_ CHECKSUM (22) - [] (22)
- []= (11)
-
_ strptime (11) - advise (11)
- binread (11)
- binwrite (22)
- byteindex (2)
- byteoffset (4)
- byterindex (2)
- civil (11)
- commercial (11)
-
copy
_ stream (22) - delete (11)
-
each
_ with _ index (22) - getlocal (22)
- jd (11)
- localtime (22)
- match (22)
- new (11)
-
new
_ offset (11) - ordinal (11)
- pread (7)
-
primitive
_ convert (33) -
rb
_ time _ timespec _ new (9) - read (33)
- retrbinary (22)
-
ruby 1
. 9 feature (11) - seek (11)
- storbinary (22)
-
with
_ index (32) - write (33)
検索結果
先頭5件
-
MatchData
# offset(name) -> [Integer , Integer] | [nil , nil] (24451.0) -
name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返 します。
...name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返
します。
//emlist[例][ruby]{
[ self.begin(name), self.end(name) ]
//}
と同じです。nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil......ます。
@param name 名前(シンボルか文字列)
@raise IndexError 正規表現中で定義されていない name を指定した場合に発生します。
//emlist[例][ruby]{
/(?<year>\d{4})年(?<month>\d{1,2})月(?:(?<day>\d{1,2})日)?/ =~ "2021年1月"
p $~.offset('year') # => [0,......4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end......4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end, MatchData#offset... -
MatchData
# offset(n) -> [Integer , Integer] | [nil , nil] (24316.0) -
n 番目の部分文字列のオフセットの配列 [start, end] を返 します。
...フセットの配列 [start, end] を返
します。
//emlist[例][ruby]{
[ self.begin(n), self.end(n) ]
//}
と同じです。n番目の部分文字列がマッチしていなければ
[nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n......を指定した場合に発生します。
@see MatchData#begin, MatchData#end......を指定した場合に発生します。
@see MatchData#begin, MatchData#end, MatchData#offset... -
DateTime
# offset -> Rational (24301.0) -
時差を返します。
時差を返します。 -
Psych
:: SyntaxError # offset -> Integer (21223.0) -
エラーが生じた位置の offset をバイト数で 返します。
...エラーが生じた位置の offset をバイト数で
返します。
offset とは、
Psych::SyntaxError#line, Psych::SyntaxError#column
で指示される位置からの相対位置です。
この位置から 0 バイトの位置でエラーが発生することが多いため、
このメ... -
Time
# localtime(utc _ offset) -> self (15307.0) -
タイムゾーンを地方時に設定します。
...param utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
Time#localtime, Time#gmtime の挙動はシステムの
localti......存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、ある特定の
時刻までの経過秒は、システムがうるう秒を勘定するかどうかによって異
なる場合があります。システムを越えて Time オブジェ......。
//emlist[][ruby]{
p t = Time.utc(2000, "jan", 1, 20, 15, 1) # => 2000-01-01 20:15:01 UTC
p t.utc? # => true
p t.localtime # => 2000-01-02 05:15:01 +0900
p t.utc? # => false
p t.localtime("+09:00")... -
Time
# localtime -> self (15207.0) -
タイムゾーンを地方時に設定します。
...param utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
Time#localtime, Time#gmtime の挙動はシステムの
localti......存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、ある特定の
時刻までの経過秒は、システムがうるう秒を勘定するかどうかによって異
なる場合があります。システムを越えて Time オブジェ......。
//emlist[][ruby]{
p t = Time.utc(2000, "jan", 1, 20, 15, 1) # => 2000-01-01 20:15:01 UTC
p t.utc? # => true
p t.localtime # => 2000-01-02 05:15:01 +0900
p t.utc? # => false
p t.localtime("+09:00")... -
VALUE rb
_ time _ timespec _ new(const struct timespec *ts , int offset) (12534.0) -
引数 ts、offset を元に Time オブジェクトを作成して返します。
...offset を元に Time オブジェクトを作成して返します。
@param ts timespec 構造体のポインタ
@param offset 協定世界時との時差(秒)。
-86400 < offset < 86400 の場合は指定した時差に、INT_MAX
を指定した場合は地方時、I......NT_MAX-1 を指定した場合は UTC に
なります。
@raise ArgumentError offset に上述の範囲以外の値を指定した場合に発生し
ます。... -
DateTime
. ordinal(year = -4712 , yday = 1 , hour = 0 , min = 0 , sec = 0 , offset = 0 , start = Date :: ITALY) -> DateTime (12507.0) -
年日付に相当する日時オブジェクトを生成します。
...トを生成します。
DateTime.new も参照してください。
@param year 年
@param yday 年の日
@param hour 時
@param min 分
@param sec 秒
@param offset 時差
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス日
@raise ArgumentError 正しくない... -
IO
# advise(advice , offset=0 , len=0) -> nil (12431.0) -
posix_fadvise(2) を呼びだし、 ファイルへのアクセスパターンをOSに知らせます。
...posix_fadvise(2) を呼びだし、
ファイルへのアクセスパターンをOSに知らせます。
advice には以下のいずれかのシンボルを指定します。
* :normal - デフォルト
* :sequential - データは前から順にアクセスされる
* :random - データ......はランダムアクセスされる
* :willneed - データはこの直後にアクセスされる
* :dontneed - データは直後にはアクセスしない
* :noreuse - データは一度しかアクセスされない
これらの advice が具体的に何をするのかはプラットフ......は offset と len で特定することができます。
len が 0 ならば、offset からファイル末尾までを指定したことになります。
デフォルトでは offset と len がともに 0 なので、
ファイル全体を指定したことになります。
posix_fadvise を... -
IO
. binread(path , length = nil , offset = 0) -> String | nil (12417.0) -
path で指定したファイルを open し、offset の所まで seek し、 length バイト読み込みます。
...path で指定したファイルを open し、offset の所まで seek し、
length バイト読み込みます。
Kernel.#open と同様 path の先頭が "|" ならば、"|" に続くコマンドの出力を読み取ります。
length を省略するとファイルの末尾まで読み込み......:ASCII-8BIT" です。
//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...\n")
IO.binread("testfile") # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
IO.binread("testfile", 20) # => "This is li......ne one\nThi"
IO.binread("testfile", 20, 10) # => "ne one\nThis is line "
//}
@see IO.read...