別のキーワード
検索結果
-
Time
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (18113.0) -
パターンマッチに使用する名前と値の Hash を返します。
...します。nil の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
t = Time.utc(2022, 10, 5, 21, 25, 30)
if t in wday: 3, day: ..7 # deconstruct_keys が使われます
puts "first Wednesday of the month"
end
#=> "first Wednesday of the month" が出力される...