36件ヒット
[1-36件を表示]
(0.101秒)
検索結果
-
DateTime
# second -> Integer (15320.0) -
秒を返します (0-59)。
...秒を返します (0-59)。... -
DateTime
# sec -> Integer (220.0) -
秒を返します (0-59)。
...秒を返します (0-59)。... -
File
:: Stat # <=>(o) -> Integer | nil (214.0) -
ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。
...' # for Tempfile
fp1 = Tempfile.open("first")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"
p File::Stat.new(fp1.path) <=> File::Stat.new(fp2.path) #=> -1
p File::Stat.new(fp2.path) <=> File::Stat.new(fp1.path) #=> 1
p File::Stat.new(fp1.path) <=> fp2.p...