Skip to main content
Category

Ruby

Ruby

RUBY – Defining Methods

As with all languages the ability to encapsulate and reuse code is always important and if nothing else keeps the code concise and readable, one of the main aims of Ruby. In this example we…
The Urban Penguin
October 14, 2013
Ruby

Ruby – if and unless

You may well be used to the conditional if statement in almost all programming, if not all. In ruby if does exist and we will use it. We also have a new conditional operator to…
The Urban Penguin
October 11, 2013
Ruby

Ruby — All about case

In ruby we can manipulate the case of strings with methods: capitalize upcase downcase Working with irb the interactive ruby environment we can test this easily. First we will create a local variable. Local variable…
The Urban Penguin
October 10, 2013