mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2025-07-30 13:30:16 +00:00
Add name and code
This commit is contained in:
11
code/rubyhelloworld.rb
Normal file
11
code/rubyhelloworld.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class HelloWorld
|
||||
def initialize(name)
|
||||
@name = name.capitalize
|
||||
end
|
||||
def say_hi
|
||||
puts "Hello #{@name}!"
|
||||
end
|
||||
end
|
||||
|
||||
hello = HelloWorld.new("World")
|
||||
hello.say_hi
|
Reference in New Issue
Block a user