Select Page

Author: Jay Luong

Ruby Variables Basics

Variables in Ruby are basically pointers to an object in memory (heap). a = “bacon” puts “a’s object id: #{a.object_id}” # b points to the same Object as a b = a puts “b’s object id:...

Read More

Ruby Blocks Tutorial

Sometimes we need to make our code more expressive and tidy but at the same time flexible and easier to use. Learning how to use Ruby blocks appropriately will level you up as a Ruby programmer. Sometimes we like to...

Read More

How to Write Your Own Iterators in Ruby

Generally if your class has an array/hash, sometimes you don’t want to expose the implementation of those collections outside of the object. Creating your own iterator will make your object easier to use. class Headphone...

Read More