Book Image

Comprehensive Ruby Programming

By : Jordan Hudgens
Book Image

Comprehensive Ruby Programming

By: Jordan Hudgens

Overview of this book

Ruby is a powerful, general-purpose programming language that can be applied to any task. Whether you are an experienced developer who wants to learn a new language or you are new to programming, this book is your comprehensive Ruby coding guide. Starting with the foundational principles, such as syntax, and scaling up to advanced topics such as big data analysis, this book will give you all of the tools you need to be a professional Ruby developer. A few of the key topics are: object-oriented programming, built-in Ruby methods, core programming skills, and an introduction to the Ruby on Rails and Sinatra web frameworks. You will also build 10 practical Ruby programs. Created by an experienced Ruby developer, this book has been written to ensure it focuses on the skills you will need to be a professional Ruby developer. After you have read this book, you will be ready to start building real-world Ruby projects.
Table of Contents (20 chapters)

Summary

This chapter covered a lot of important concepts. This chapter's primary goal was to examine how OOP can be utilized to limit duplicate code and share core functionality between subclasses. Initially, we walked through a real-world example of OOP and saw how to implement setters and getters in Ruby classes. You looked at the concept of instantiation and learned the initialize method in Ruby, including its syntax, when it can be helpful to use, and various options you can pass to it in order to perform tasks such as setting default values.

We saw one of the important building blocks of OOP development: inheritance. The key to remember about inheritance is that it gives you the ability to clean up your codebase and create inherited classes that share common behavior. We reviewed the differences between private and public methods in Ruby classes. We analyzed how to categorize...