Tags: class

by Darren Jensen | Programming | January 2015

Background

When an application grows in size it’s common that it may slow down considerably in the face of heavy usage. Rather than looking at the larger picture its often best to take a microscope and look closely at the performance of the code, method by method, line by line. One tool that the Ruby Standard Library provides to assist with this is Benchmark. Lets take a quick dive into the features of the Ruby Benchmarking tool!

Read More
by Darren Jensen | Programming | March 2016

Background

Most command line applications usually accept a variety of options that can be passed in to alter the behaviour of the application. For example, in linux, the find command can take a -type d option to specify only search for directories. For example the following command will find all empty directories under ~/Documents:

find ~/Documents -type d -empty

Read More
by Darren Jensen | Programming | January 2015

The Observable module is a useful and elegant way to watch for changes in an object in Ruby. A common example is for alerting of some condition within the object being observed. The example shown in the documentation is for a Ticker class which has two observers: one for when the price goes below a certain level and one for when the price goes above a certain level. What we will do today is show something similar, but for a CoffeeShop class instead. Let’s get to it!

Read More
by Darren Jensen | Programming | January 2015

Background

The Enumerable module in Ruby Core is very powerful. It provides methods such as sort, min, max and others for working specifically with collections. Its implemented by collection classes such as Array out of the box but what if you need to make your own custom collection class? In this case you will need to include the Enumerable module. Here’s how.

Read More
Contact
about Rotati

Rotati is a full service Web and Mobile application consultancy. We use Ruby and JavaScript as our tools of choice.