hacktoberfest-2018/code/kamaliqlaas.rb

12 lines
178 B
Ruby
Raw Normal View History

2018-10-03 06:29:46 +00:00
class HelloWorld
def initialize(name)
@name = name.capitalize
end
def say_hi
puts "Hello #{@name}!"
end
end
hello = HelloWorld.new("World")
hello.say_hi