12件ヒット
[1-12件を表示]
(0.051秒)
クラス
- Object (12)
検索結果
-
Object
# ===(other) -> bool (63.0) -
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
...d"
def check arg
case arg
when /ruby(?!\s*on\s*rails)/i
"hit! #{arg}"
when String
"Instance of String class. But don't hit."
else
"unknown"
end
end
puts check([]) #=> unknown
puts check("mash-up in Ruby on Rails") #=> instance of String class. But not hit...
puts check("<Ruby...