mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2024-11-20 10:17:27 +00:00
12 lines
178 B
Ruby
12 lines
178 B
Ruby
|
class HelloWorld
|
||
|
def initialize(name)
|
||
|
@name = name.capitalize
|
||
|
end
|
||
|
def say_hi
|
||
|
puts "Hello #{@name}!"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
hello = HelloWorld.new("World")
|
||
|
hello.say_hi
|