我有一个布尔值来检查它是否为true,然后设置一个局部变量.如何重构这个,这样它就是
Ruby-ish呢?
if firm.inflection_point inflection_point = 1 else inflection_point = 0 end
解决方法
inflection_point = (firm.inflection_point ? 1 : 0)