How to write case statement in Ruby?

In Ruby, Use ‘case‘ keyword instead of ‘switch‘ and ‘when‘ instead of ‘case‘. The case statement matches one statement with multiple conditions just like a switch statement in other languages. Syntax: Let’s understand, With Example: Output: Hope you understand how to write case statement program 🙂

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 start Ruby from scratch?

Hello Everyone, This is for who don’t know the Ruby programming language and want to learn this, But they don’t finding any source like how to start this. So, There are some guideline given to start from scratch for ruby. First of all, If you don’t know how to code…. no worry. Because, When you start learning ruby you get understanding about coding. If […]

Introduction

Hi There, My name is Pruthviraj Rathod and I’m creator of this blog. To help you get started, here are a few questions: Going step by step from scratch. A fresher or any learner who loves programming can read this blog. Every day one post that can learn with a fresh mind and not be […]