This course will cover an array of advanced topics in Ruby. You’ll start this course by gaining an understanding of standard Ruby conditions. Then, you will 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. From there, you’ll learn how to integrate no guards into Ruby programs and understand how they can be used for data validation in Ruby methods.
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 demo. 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.
Learn 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.
From here we will move on to two advance topics: Procs and Metaprogramming
Learn how to use Proc class in Ruby, along with the key differences between Proc and Lambda classes. Then, learn 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.