The code for the show method finds the home page in the database and displays it.
show方法的代码将在数据库中查找主页面并显示出来。
Listing 10 shows the initial implementation of the controller, with a sole show method.
清单10通过单一的show方法,显示了控制器的初始实现。
This test looks a little different, because the show method expects a specific person to show.
这个测试看起来和前面几个有些不同,因为show方法需要指明所要显示的person实例。
For those who want to experiment with pattern matching just a bit more, Listing 8 is another way to write the show method.
如果想再试一下模式匹配,那么可以看看清单8中是如何以另一种方式编写show方法的?
For those who want to experiment with pattern matching just a bit more, Listing 8 is another way to write the show method.
如果想再试一下模式匹配,那么可以看看清单8中是如何以另一种方式编写show方法的?
应用推荐