るりまサーチ

最速Rubyリファレンスマニュアル検索!
960件ヒット [901-960件を表示] (0.100秒)

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

<< < ... 8 9 10 >>

Kernel#wait_writable -> () (137.0)

ファイルが書き込み可能になるまで待ちます。

...ファイルが書き込み可能になるまで待ちます。

ruby -run -e wait_writable -- [OPTION] FILE

-
n RETRY リトライ回数
-
w SEC リトライごとに待つ秒数
-
v 詳細表示...

Fiddle::Importer#struct(signature) -> Class (125.0)

C の構造体型に対応する Ruby のクラスを構築して返します。

...してデータを定義します。例えば C における
struct timeval {
long tv_sec;
long tv_usec;
};
という構造体型に対応して
Timeval = struct(["long tv_sec", "long tv_usec"])
として構造体に対応するクラスを生成します。

このメソッドが返...
...require 'fiddle/import'

module M
extend Fiddle::Importer
dlload "libc.so.6"
extern "int gettimeofday(void*, void*)"
Timeval = struct(["long tv_sec", "long tv_usec"])
end

time = M::Timeval.malloc
M.gettimeofday(time, Fiddle::NULL)
p time.tv_sec
p time.tv_usec...

Net::HTTP#keep_alive_timeout=(seconds) (123.0)

以前のリクエストで使ったコネクションの再利用(keep-alive)を許可する秒数を 設定します。

...ションの再利用(keep-alive)を許可する秒数を
設定します。

この秒数以内に同じホストに次のリクエストを送った場合、
ソケットを再利用します。

デフォルトは2(秒)です。これは一般的にサーバ側の keep-alive の秒数
が2秒で...

Time#to_i -> Integer (120.0)

起算時からの経過秒数を整数で返します。

...起算時からの経過秒数を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5,6)
p t # => 2000-01-02 03:04:05 +0900
p "%10.6f" % t.to_f # => "946749845.000006"
p t.to_i # => 946749845
p t.tv_sec # => 946749845
//}...

DateTime#deconstruct_keys(array_of_names_or_nil) -> Hash (119.0)

パターンマッチに使用する名前と値の Hash を返します。

...ます。

キーに利用できる名前は以下の通りです。

* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :sec_fraction
* :zone

@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全て...
...れます
puts "Working time"
end
#=> "Working time" が出力される

case dt
in year: ...2022
puts "too old"
in month: ..9
puts "quarter 1-3"
in wday: 1..5, month:
puts "working day in month #{month}"
end
#=> "working day in month 10" が出力される

# クラスのチェックと組...

絞り込み条件を変える

Time#deconstruct_keys(array_of_names_or_nil) -> Hash (113.0)

パターンマッチに使用する名前と値の Hash を返します。

...す。

キーに利用できる名前は以下の通りです。

* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :subsec
* :dst
* :zone

@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全て...
...sday of the month"
end
#=> "first Wednesday of the month" が出力される

case t
in year: ...2022
puts "too old"
in month: ..9
puts "quarter 1-3"
in wday: 1..5, month:
puts "working day in month #{month}"
end
#=> "working day in month 10" が出力される

# クラスのチェックと...

Fiddle::Importer#sizeof(t) -> Integer (107.0)

C における sizeof(t) の値を返します。

...ている型を Fiddle が知らなかった
場合に発生します

例:

require 'fiddle/import'

module M
extend Fiddle::Importer
Timeval = struct(["long tv_sec", "long tv_usec"])
p sizeof("char") # => 1
p sizeof("void*") # => 8
p sizeof(Timeval) # => 16
end...
<< < ... 8 9 10 >>