The Ruby programming language is free and open source. It is both object-oriented and interpretive. Yukihiro Matsumoto invented Ruby. Ruby’s founder referred to it as the jewel of programming languages because it was named after a gemstone. Here, we’ll talk about the various Ruby commands.
The following criteria were taken into account during the development of Ruby:
Most UNIX-based platforms support Ruby. Ruby was primarily developed on Linux. Common platforms like Windows, DOS, macOS, etc., are all compatible with Ruby.
integer
datatype in Rubyemployees = {'Ahmad' => 9500, 'Irfan' => 6700, 'Ali' => 9700}array=[1,2,3,4,5];puts 1.class
float
datatype in Rubyemployees = {'Ahmad' => 9500, 'Irfan' => 6700, 'Ali' => 9700}array=[1,2,3,4,5];puts 1.0.class
string
datatype in Rubyemployees = {'Ahmad' => 9500, 'Irfan' => 6700, 'Ali' => 9700}array=[1,2,3,4,5];puts 'str'.class
boolean variable
datatype in Rubyemployees = {'Ahmad' => 9500, 'Irfan' => 6700, 'Ali' => 9700}array=[1,2,3,4,5];puts false.classputs true.class
Hash
datatype in Rubyemployees = {'Ahmad' => 9500, 'Irfan' => 6700, 'Ali' => 9700}array=[1,2,3,4,5];puts employees.class
Array
datatype in Rubyemployees = {'Ahmad' => 9500, 'Irfan' => 6700, 'Ali' => 9700}array=[1,2,3,4,5];puts array.class
Free Resources