def area_of_rectangle(input) return if (input.vertical < 0 || input.horizonal < 0) input.vertical * input.horizonal end
解答①
def rectangle(i) return if (i.a < 0 || i.b < 0) i.a * i.b end
解答②