04 2007 档案
rails中的调试便利
摘要:相比较asp.net中的调试,rails提供的一些特性让我很是喜爱:ruby script/console这个脚本可以让应用加载到irb中,方便地测试rails代码,看到这个,我不禁构思起怎么实现个类似的东西给.net用不需要response.write之类的方法,也不用自己去实现个序列化,rails里可以直接在页面上这样一下,输出标准的html,很是方便<%=debug(@xxx) %&g... 阅读全文
posted @ 2007-04-27 10:35 sharpedge 阅读(393) 评论(1) 推荐(0)
ruby中的yield关键字
摘要:在ruby第二章里面有一段话: " This is pretty interesting and important, and so if you weren't paying attention before, you should probably start now." 讲的就是yield这个关键字所传达的东西,这也是ruby比较有特色的一个地方 输入 def call_block ... 阅读全文
posted @ 2007-04-03 01:21 sharpedge 阅读(3138) 评论(2) 推荐(0)