随笔分类 -  Ruby Rails

Ruby Rails Metaprogramming
摘要:概念Metaprogrammingiswritingcodethatwritescode.Metaprogrammingiswritingcodethatmanipulateslanguageconstructsatruntime.可以编写代码的代码MetaprogrammingRubyThisparticularbrandofmetaprogrammingimpliesthatyouuseaprogramtogenerateorotherwisemanipulateasecond,distinctprogram—andthenyourunthesecondprogram.Afteryouru 阅读全文
posted @ 2012-08-03 08:17 2012 阅读(522) 评论(0) 推荐(0) 编辑
摘要:命名约定Rails约定安装和调试ruby186-27_rc2.exe: 这个包含编辑工具scite、语言例子代码、Programming Ruby书等本地安装:rails-2.2.2.zip 解压后gem install rails –l rails-2.2.2.gem联网安装最新的版本gem install rails 阅读全文
posted @ 2012-07-29 09:53 2012 阅读(374) 评论(0) 推荐(0) 编辑
摘要:• In Ruby’s object-oriented world, we work with objects and methods. Unlike VB .NET, where some subroutines return a value (Functions) and others do not (Subs), all Ruby methods must return a value. When an explicit return statement is not used, the last-evaluated expression automatically becomes th 阅读全文
posted @ 2012-07-25 20:47 2012 阅读(395) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示