10. Ruby Beyond the Basics ll

Overview

By the end of this chapter, you will be able to open classes to add/modify methods; implement monkey patching; use methods such as method_missing and define_method to dynamically create methods at runtime; generate HTTP requests using the built-in Ruby HTTP client net/http; create GET and POST requests using Ruby and create your own gems to share your reusable code.

Introduction

In the previous chapter, we learned about a number of advanced topics, including blocks, procs, and lambdas, which we will use in this chapter when we dive deep into the world of metaprogramming. We will also learn when we should not apply metaprogramming concepts by not always crossing the line into monkey patching (which ...

Get The Ruby Workshop now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.