クラス
- Array (11)
- File (43)
-
File
:: Stat (44) - Integer (22)
- Mutex (2)
- Object (22)
-
Process
:: Tms (88) - Random (33)
- String (22)
-
Thread
:: ConditionVariable (9) -
Thread
:: Mutex (9) - Time (616)
- UnboundMethod (11)
キーワード
- % (11)
- * (22)
- + (11)
- - (22)
- <=> (11)
-
_ dump (11) - asctime (11)
- atime (22)
- birthtime (21)
- ceil (5)
- cstime (11)
- cstime= (11)
- ctime (33)
- cutime (11)
- cutime= (11)
- day (11)
- dst? (11)
- eql? (11)
- floor (5)
- friday? (11)
- getgm (11)
- getlocal (22)
- getutc (11)
- gmt? (11)
-
gmt
_ offset (11) - gmtime (11)
- gmtoff (11)
- hash (11)
- hour (11)
- inspect (16)
- isdst (11)
- localtime (22)
- mday (11)
- min (11)
- mon (11)
- monday? (11)
- month (11)
- mtime (22)
- nsec (11)
- rand (33)
- round (11)
- saturday? (11)
- sec (11)
- sleep (11)
-
source
_ location (11) - stime (11)
- stime= (11)
- strftime (11)
- subsec (11)
- succ (7)
- sunday? (11)
- thursday? (11)
- times (22)
-
to
_ a (11) -
to
_ f (11) -
to
_ i (11) -
to
_ r (11) -
to
_ s (11) - tuesday? (11)
-
tv
_ nsec (11) -
tv
_ sec (11) -
tv
_ usec (11) - usec (11)
- utc (11)
- utc? (11)
-
utc
_ offset (11) - utime (11)
- utime= (11)
- wait (9)
- wday (11)
- wednesday? (11)
- yday (11)
- year (11)
- zone (11)
検索結果
先頭5件
-
Process
:: Tms # utime -> Float (6103.0) -
ユーザー CPU 時間を返します。
ユーザー CPU 時間を返します。 -
Process
:: Tms # utime=(n) (6103.0) -
ユーザー CPU 時間をセットします。
ユーザー CPU 時間をセットします。 -
Array
# *(times) -> Array (103.0) -
配列の内容を times 回 繰り返した新しい配列を作成して返します。 値はコピーされないことに注意してください。
...配列の内容を times 回 繰り返した新しい配列を作成して返します。
値はコピーされないことに注意してください。
@param times 繰り返したい回数を整数で指定します。
整数以外のオブジェクトを指定した場合は to_in... -
Mutex
# sleep(timeout = nil) -> Integer (103.0) -
与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
...与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
@param timeout スリープする秒数を指定します。省略するとスリープし続けます。
@return スリープしていた秒数を返します。
@raise ThreadError... -
String
# *(times) -> String (103.0) -
文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。
...文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。
@param times 整数
@return self を times 回繰り返した新しい文字列
@raise ArgumentError 引数に負数を指定したときに発生します。
//emlist[例][ruby]{
p "s... -
Thread
:: ConditionVariable # wait(mutex , timeout = nil) -> self (103.0) -
mutex のロックを解放し、カレントスレッドを停止します。 Thread::ConditionVariable#signalまたは、 Thread::ConditionVariable#broadcastで送られたシグナルを 受け取ると、mutexのロックを取得し、実行状態となります。
...受け取ると、mutexのロックを取得し、実行状態となります。
@param mutex Mutex オブジェクトを指定します。
@param timeout スリープする秒数を指定します。この場合はシグナルを受け取
らなかった場合でも指定した秒... -
Thread
:: Mutex # sleep(timeout = nil) -> Integer (103.0) -
与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
...与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
@param timeout スリープする秒数を指定します。省略するとスリープし続けます。
@return スリープしていた秒数を返します。
@raise ThreadError......与えられた秒数の間ロックを解除してスリープして、実行後にまたロックします。
@param timeout スリープする秒数を指定します。省略するとスリープし続けます。
@return タイムアウトした時は nil を、それ以外はスリープし... -
Random
# rand -> Float (39.0) -
一様な擬似乱数を発生させます。
...端を含む場合は1、含まない場合は0です)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Time の場合などにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定され......(4.2 は除く)
prng.rand(0...4.2) # => 3.6148130397862865
# 2012年のすべての(秒単位)時刻から一つ選ばれる
prng.rand(Time.new(2012, 1, 1) ... Time.new(2013,1,1)) # => 2012-02-25 03:11:42 +0900
require 'date'
prng.rand(Date.new(2012, 1, 1) ... Date.new(2013,1,1)) # => #<Date: 2012-......12年のすべての時刻から一つ選ばれる
# Time#- は秒数を float で返すため。
prng.rand(Time.new(2012, 1, 1) ... Time.new(2013,1,1)) # => 2012-02-25 03:11:42 +0900
# DateTime ではうまくいかない。というのは DateTime#- は
# Rational を返すため。
# Date#- も R... -
Random
# rand(max) -> Integer | Float (39.0) -
一様な擬似乱数を発生させます。
...端を含む場合は1、含まない場合は0です)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Time の場合などにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定され......(4.2 は除く)
prng.rand(0...4.2) # => 3.6148130397862865
# 2012年のすべての(秒単位)時刻から一つ選ばれる
prng.rand(Time.new(2012, 1, 1) ... Time.new(2013,1,1)) # => 2012-02-25 03:11:42 +0900
require 'date'
prng.rand(Date.new(2012, 1, 1) ... Date.new(2013,1,1)) # => #<Date: 2012-......12年のすべての時刻から一つ選ばれる
# Time#- は秒数を float で返すため。
prng.rand(Time.new(2012, 1, 1) ... Time.new(2013,1,1)) # => 2012-02-25 03:11:42 +0900
# DateTime ではうまくいかない。というのは DateTime#- は
# Rational を返すため。
# Date#- も R... -
Random
# rand(range) -> Integer | Float (39.0) -
一様な擬似乱数を発生させます。
...端を含む場合は1、含まない場合は0です)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Time の場合などにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定され......(4.2 は除く)
prng.rand(0...4.2) # => 3.6148130397862865
# 2012年のすべての(秒単位)時刻から一つ選ばれる
prng.rand(Time.new(2012, 1, 1) ... Time.new(2013,1,1)) # => 2012-02-25 03:11:42 +0900
require 'date'
prng.rand(Date.new(2012, 1, 1) ... Date.new(2013,1,1)) # => #<Date: 2012-......12年のすべての時刻から一つ選ばれる
# Time#- は秒数を float で返すため。
prng.rand(Time.new(2012, 1, 1) ... Time.new(2013,1,1)) # => 2012-02-25 03:11:42 +0900
# DateTime ではうまくいかない。というのは DateTime#- は
# Rational を返すため。
# Date#- も R... -
UnboundMethod
# source _ location -> [String , Integer] | nil (27.0) -
ソースコードのファイル名と行番号を配列で返します。
...合は nil を返します。
//emlist[例][ruby]{
require 'time'
Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2.4.0/time.rb", 654]
//}
@see Proc#source_location, Method#source_locati... -
Object
# _ dump(limit) -> String (9.0) -
Marshal.#dump において出力するオブジェクトがメソッド _dump を定義している場合には、そのメソッドの結果が書き出されます。
...い場合や拡張ライブラリで定義し
たクラスのインスタンスがインスタンス変数以外に情報を保持する場合に
利用します。(例えば、クラス Time は、_dump/_load を定義して
います)
@see Object#marshal_dump, Object#marshal_load, Class#_load...