Mukul Latiyan has Published 474 Articles

What languages have been used to write Windows, Mac OS and Linux OS?

Mukul Latiyan

Mukul Latiyan

Updated on 12-Jul-2022 09:05:15

5K+ Views

We know that an operating system is considered the backbone of any system that you may use. The three most common and widely used operating systems share things in common just as well as they share differences. While there are cases where one might outperform another, those cases and such ... Read More

How to Implement Multithreading in Ruby

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 13:27:24

195 Views

In this article, we will learn how we can use multithreading in Ruby. We will take a couple of examples, where we will spawn two new threads and then perform some concurrent operations on them. In Ruby, we can create a new thread with the help of the Thread.new() function.Example ... Read More

Useful Methods of Integer Class in Ruby

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 08:54:48

354 Views

Ruby's integer class is the foundation for the two concrete classes that represent whole numbers. Bignum and Fixnum are these concrete classes. Bignum holds the integer value that is outside the range of Fixnum, which is displayed in the native machine word.There are a variety of methods in the integer ... Read More

How to Use Instance Variables in Ruby

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 08:52:45

1K+ Views

In Ruby, there are four different types of variables that we can declare −Local VariablesInstance VariablesClass VariablesGlobal VariablesAn Instance variable has a name that starts with the @ symbol. It should be noted that the contents of an instance variable are only restricted to the object which itself refers to.An ... Read More

Difference between 'include' and 'extend' in Ruby

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 08:49:45

1K+ Views

In Ruby, when we are using the include keyword, we are importing a module code, but we aren't allowed to access the methods of the imported modules with the class directly because it basically gets imported as a subclass for the superclass.On the other hand, when we are using the ... Read More

How to use the "or" keyword in Ruby?

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 08:45:00

1K+ Views

In Ruby, we use the "or" keyword to return the logical difference between its two operands. In simple terms, we can say that a condition becomes True if both the operands are true."or" returns True if any one of the conditions/expressions is "true".It returns False only when all the conditions ... Read More

How to use the "not" keyword in Ruby?

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 08:39:24

1K+ Views

In Ruby, we use the not keyword when we want to get an expression and then invert its Boolean value. In simple words, if an expression evaluates to True, then by using the not keyword, we will get False as the result of the expression.It can be said that the ... Read More

How to use the "defined?" keyword in Ruby?

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 08:37:13

511 Views

Ruby provides a special keyword known as defined? that is used to determine if a particular object or data type is defined in Ruby or not.The defined? keyword will return a string describing its expression or argument, if the passed expression or argument is defined. It returns nil if the ... Read More

How to use the 'and' keyword in Ruby?

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 08:35:03

525 Views

'and' Keyword in RubyIn Ruby, we use the "and" keyword to return True if both the operands are true, and False if one or more of the operands is false. It should be noted that the and keyword is equivalent to the && logical operator, but it has lower precedence ... Read More

How to invoke methods in Ruby?

Mukul Latiyan

Mukul Latiyan

Updated on 12-Apr-2022 08:32:45

567 Views

Methods in Ruby, as in other programming languages, bundle one or more repeatable statements into a single unit. Method names in Ruby should begin with a lowercase letter. If you begin a method name with an uppercase letter, Ruby might think that it is a constant and hence can parse ... Read More

Advertisements