The resulting code is a beautiful example of a tiny domain-specific language within Rails that extends Ruby to make a kind of switch statement. Here's how it works.
生成的代码是Rails中小型的特定于域的语句的优美示例,它扩展Ruby以构造一种switch语句。
For example, even though this unit is less efficient that the other two, it's a tiny difference, and the same goes for the rails.
例如,即使这个单位是效率不高,其他两个,这是一个微小的差异,也是一样的铁轨。
For example, even though this unit is less efficient that the other two, it's a tiny difference, and the same goes for the rails.
例如,即使这个单位是效率不高,其他两个,这是一个微小的差异,也是一样的铁轨。
应用推荐