This course will cover an array of advanced topics in Ruby. You’ll start this course by learning and understanding standard conditions in Ruby. Then, walk-through the full list of operators that ruby uses for conditionals. This includes everything from the basic equals conditional to complex operators that look at components such as the data type.
Next, you’ll learn about the switch module in Ruby. Starting with the basic syntax and different variations on how to implement switch statements. You will also learn when it’s considered a better practice to use switch statements over if/else conditionals. Moving on to how to integrate no guards into Ruby programs and how they can be used for data validation in Ruby methods.
Then, you will learn what blocks are, how to implement them, and how to use shortcut methods that will save you time when building programs. We’ll then walk through the basic syntax of yield and finish off with a full implementation. You will then learn how to effectively implement the block given method in Ruby. We’ll also discuss how the file class uses blocks and how it can allow developers to have multiple options for working with files.
Now that you have an understanding of blocks we will review a Ruby on Rails application to see how the popular web framework utilizes blocks in order to make their master layout feature possible. This will include a further discussion of blocks and the yield method.
You will transition into learning about the helpful Ampersand process Ruby has in order to add syntactic sugar to passing methods to blocks. This will include a practical implementation using the built-in inject method.
Moving on to two advance topics: Procs and Metaprogramming
Learn how to use Proc class in Ruby, you will also learn key differences between Proc and Lambda classes. Moving into how the Ruby on Rails framework integrates metaprogramming in order to extend the flexibility of database query methods.
Lastly, we discuss error handling, frameworks, and algorithms. Concluding this robust course of Ruby Intermediate.