Using Blocks in Ruby. Jay McGavren


Even if you’ve programmed in other languages, you’ve probably never seen anything like blocks. But stick with it, because the payoff is big. Imagine if, for all the methods you have to write for the rest of your career, someone else wrote half of the code for you. For free. They’d write all the tedious stuff at the beginning and end, and just leave a little blank space in the middle for you to insert your code, the clever code, the code that runs your business. If we told you that blocks can give you that, you’d be willing to do whatever it takes to learn them, right? Well, here’s what you’ll have to do: be patient, and persistent. We’re here to help. We’ll look at each concept repeatedly, from different angles. We’ll provide exercises for practice. Make sure to do them, because they’ll help you understand and remember how blocks work. A few hours of hard work now are going to pay dividends for the rest of your Ruby career, we promise. Let’s get to it!

Если вам понравилась эта книга поделитесь ею с друзьями, тем самым вы помогаете нам развиваться и добавлять всё больше интересных и нужным вам книг!