5 Types Of Ruby Comments & How to Use Them Correctly

What are comments in Ruby? A Ruby comment adds information to your code that may be helpful for you or other developers. The most common type of comment is the single-line comment. Here’s the syntax: # I like apples & oranges Notice three things: The comment starts with a pound (#) symbol We put a … Read more

What is Dry-rb?

Looking for some new & interesting gems to try? Then have a look at dry-rb, a set of gems that bring solutions to common problems. Dry-rb is composed of over 18 Ruby gems that can work together or by themselves. Some of these gems include: dry-initializer dry-struct dry-validations dry-events dry-transaction In this post, you’ll learn … Read more

How to Use The Initialize Method in Ruby

The initialize method is part of the object-creation process in Ruby & it allows you to set the initial values for an object. In other programming languages they call this a “constructor”. For example: Let’s say that you have a Point class, this point needs two coordinates, x & y. How are you going to … Read more

How to Control a Web Browser From Ruby With Watir

Did you know that you can control your web browser with Ruby? The Watir gem allows you to do this. And it comes with the full power of modern browsers: You can take a screenshot of the visible area of the page You can run javascript on any page, without having to manually open the … Read more