How to write if-else statement in Ruby?

You can use this statement in various format. like, if statement: Execute if block if condition is true. Check syntax here: See this example, Output: if-else statement: Execute if block if condition is true. Otherwise, execute else block. Check syntax here, See this example, Output: elsif statement: Execute if block if condition is true. Otherwise, […]

First Ruby Program

Before you start your first ruby program. Must sure that, You installed it. If you don’t know how to install ruby, Please refer this link for a proper guideline : Link Now, Open any text editor and write this program to check the first ruby program: Save this file as “first.rb” Note: Save Ruby program […]

How to install Ruby?

We can use ruby in cross-platform. For example, Windows, OS X, UNIX, etc. So, We can install it on that differently. Let’s, have some fun in Ruby. Windows: For Windows, you can use RubyInstaller. That gives you a full Ruby environment. OS X: For OS X, Ruby was installed by default. Since, New updates. If, […]