CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Ruby

Ruby Programming – String interpolation

Ruby supports string interpolation in which we can embed the expressions within the string literals. This is a very useful feature to create formatted strings in a more readable form. We are going to discuss string interpolation in Ruby, in this article. A special sequence of characters “#{ }” we use to represent the expressions […]

Ruby Programming – Inheritance in Ruby

Inheritance is one of the great feature in Object Oriented Programming. Ruby supports inheritance. Inheritance allows to inherit the features of the base classes to its derived classes. That means, through derived class objects we can access the features of the base class. Through this Article, we will discuss how we use Inheritance in Ruby. […]

Ruby Programming – Getter and Setter methods

Ruby allows defining class and instance variables. Ruby doesn’t allow us to access the variables of the class directly; instead, we can use methods to access or modify the variables of the class. We have discussed an overview of classes in Ruby through my previous Article “Ruby Programming – An Overview on Classes“. Through this […]

Ruby Programming – An Overview on Classes

As we discussed in our previous Articles, Ruby is a pure object-oriented language. That means, everything is an object of a class in Ruby. Non-object things are NOT exists in Ruby. Unlike C++ where you can write the program without classes or objects; in Ruby we CAN NOT write programs without classes or objects. Hence […]

Ruby Programming – The Basics of Ruby

Ruby is a pure object-oriented programming language. That means, everything is an object in Ruby. For example, 3 is an object of Number class. If you type 3.methods; it will return all the methods defined in the Number class. Similarly, if you type 3.class; you will see the type of the class this object is […]

Ruby Programming – Interactive shell

Once we installed Ruby, we will get one powerful command line interactive Ruby-programming environment called irb (Interactive Ruby). irb is a command line interpreter allowed to enter Ruby commands and instantly see the results in the environment itself. This is very useful when learning Ruby. In this article we will discuss about invoking ruby command-line interpreter, […]

Ruby Programming: An Introduction

Ruby is a popular open source, cross-platform, object-oriented, dynamic, scripting, interpreted programming language. It was invented in the year 1993 by Yukihiro Matsumoto (Matz). Ruby is cross-platform, that means if we develop a Ruby program based on one machine; it’s likely to run the same program without any changes on different machines. In order to develop or run […]

Scroll to top