Ruby is an open-source pure object-oriented programming language developed by Yukihiro Matsumoto. The first version of the language (0.95) was released in 1995, and in 2011, version 1.9.3 was released.
class Demo
# constructor
def initialize
puts "Welcome to GeeksforGeeks!"
end
end
# Creating Obejct
Demo.new
class Person
# constructor
def initialize (name)
puts "Person name is : #{name}."
end
end
# Creating Obejct
Person.new 'Kishan'
# this is a commented line
=begin
all
text
inside the
block are
commented
=end
#ruby #tips-and-tricks #interview-questions #faq