315件ヒット
[301-315件を表示]
(0.113秒)
種類
- インスタンスメソッド (147)
- 特異メソッド (102)
- クラス (66)
クラス
- Date (11)
- DateTime (44)
- Exception (22)
- MatchData (26)
-
RSS
:: Maker :: ChannelBase (11) -
RSS
:: Maker :: ChannelBase :: SkipDaysBase (11) -
RSS
:: Maker :: ChannelBase :: SkipDaysBase :: DayBase (22) -
RSS
:: Rss :: Channel (22) - Time (80)
キーワード
- == (11)
- DayBase (11)
- SkipDays (22)
- SkipDaysBase (11)
-
backtrace
_ locations (11) - byteoffset (4)
- civil (11)
- commercial (11)
- content (11)
- content= (11)
- local (22)
- mktime (22)
- new (25)
-
new
_ day (11) - offset (22)
- ordinal (11)
- skipDays (22)
- skipDays= (11)
- strftime (11)
- thursday? (22)
検索結果
-
Exception
# ==(other) -> bool (206.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。......//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
results = [2, 2, 4].map { |e | get_exception { check_long_month(e) } }......p results.map { |e| e.class }
# => [RuntimeError, RuntimeError, RuntimeError]
p results.map { |e| e.message }
# => ["2 is not long month", "2 is not long month", "4 is not long month"]
# class, message, backtrace が同一のため true になる
p results[0] == results[1] # => true
# class, b... -
Time
# strftime(format) -> String (192.0) -
時刻を format 文字列に従って文字列に変換した結果を返します。
...。
@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。
* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世......週の年の下2桁(00-99)
* %H: 24時間制の時(00-23)
* %h: %b と同等
* %I: 12時間制の時(01-12)
* %j: 年中の通算日(001-366)
* %k: 24時間制の時。一桁の場合、半角空白で埋める ( 0..23)
* %L: ミリ秒 (000..999)
* %l: 12時間制の時。一桁の場......me で使えます)
* %R: 24時間制の時刻。%H:%M と同等。
* %r: 12時間制の時刻。%I:%M:%S %p と同等。
* %S: 秒(00-60) (60はうるう秒)
* %s: 1970-01-01 00:00:00 UTC からの経過秒
* %T: 24時間制の時刻。%H:%M:%S と同等。
* %t: タブ文字 (\t)
* %...