![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Ruby
文章平均质量分 78
yingy7986
这个作者很懒,什么都没留下…
展开
-
ruby 学习笔记(五) Construct
Statement modifiersRuby statement modifiers are a useful shortcut if the body of an if orwhile statement is just a single expression. Simply write the expression, followed byif orwhile and the con转载 2012-10-30 16:05:33 · 274 阅读 · 0 评论 -
ruby 学习笔记(六) Blocks
A method can then invoke an associated block one or more time using the Rubyyield statement. Thus any method that wants to take a block as a parameter can use theyield keyword to execute the block转载 2012-10-30 16:20:43 · 527 阅读 · 0 评论 -
ruby 学习笔记(一)
Difference between or and || operator. Both or and || return their first argument unless it isfalse, in which case they evaluate and return their second argument. This is shown in the转载 2012-10-22 17:34:55 · 216 阅读 · 0 评论 -
ruby 学习笔记(二)
Variables Variables in Ruby can contain data of any type. You can use variables in your Ruby programswithout any declarations. Variable name itself denotes its scope (local, global,转载 2012-10-23 11:22:21 · 223 阅读 · 0 评论 -
ruby学习笔记(三)--ruby methods
we use def and end to declare a method. Parameters are simply a list of local variable names in parentheses.We do not declare the return type; a method returns the value of the last statement execut转载 2012-10-23 14:29:08 · 520 阅读 · 0 评论 -
ruby 学习笔记(四) String
Listing all methods of a class or objectString.methods.sortshows you a list of methods that the Class object String responds to.String.instance_methods.sortThis method tells you all the instan转载 2012-10-24 17:06:42 · 380 阅读 · 0 评论