Summary
In this chapter, we learned how to write, execute, and require scripts with the Ruby binary, along with how to use the IRB to execute Ruby code directly on the command line without having to write source code.
Additionally, we reviewed Ruby’s syntax for writing variables, the syntax for if
statements, and how to loop through both cycles and arrays. Finally, we learned some of the language enhancements that Ruby has and PHP doesn’t so that we can read and understand more complex Ruby code.
Now, we are ready to write Ruby code to solve real-life examples. We’ll start doing this in the next chapter.