Ruby Plus #46: Ruby Idioms Part 6
  • Video is free for view
View_video

In this screencast you will learn about inject, splat operator and include? methods and how it is used in Ruby idioms. Paul Morganthall says: Thanks for the screencasts. I just watched Ruby Idioms Part 4 about the splat operator. In the first example, the code looks something like this: fruits = ['apple', 'banana'] a, b = *fruits This works fine, you get the same results without the splat operator: a, b = fruits The splat operator in this case seems to obscure what's going on. I realize that the presence of the splat operator can change the behavior in many other cases ... but not this one.



Tags: Ruby Plus, Ruby

Level: any Date: June 30, 2008 Votes: 0 User: Dmytro Shteflyuk  Comments:
 
 

No Response(s) to this entry

Subscribe to comments with RSS.