CodeSteps

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

Author : Nick

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 […]

Scroll to top