as_of
Rubyのキーワード引数としてas_ofが使われており、初見だったので意味を調べた
https://ja.wikipedia.org/wiki/Template:As_of
「時点」を表す単語
日付だけでなく、xxxのときといった使い方もありそう
https://rubygems.org/gems/mime-types/versions/2.99.3?locale=ja
As of mime-types 2.99
パターンマッチとcase文の違い
valueパターンについては書き方の違いはないが、パターンマッチの場合はパターンにマッチしない場合は例外が発生する
case文の場合はエラーにならずにnilが返る
fruit = 'banana'
# case文
case fruit
when 'apple'
'りんご'
when 'orange'
'オレンジ'
end
# => nil
# パターンマッチ
case fruit
in 'apple'
'りんご'
in 'orange'
'オレンジ'
end
# => banana (NoMatchingPatternError)