Compare commits

..

1 commit
master ... ruby

Author SHA1 Message Date
Jo Wroten
b7e1f4d9ba Moved from hello-ruby repo to here 2019-08-06 22:47:50 -05:00
2 changed files with 18 additions and 4 deletions

View file

@ -1,6 +1,7 @@
# Hello (World) Learning
# Hello Ruby
A place for me to play around with some basic example apps, most commonly "Hello World"'s and "TODO" examples.
**Each language/framework is broken down by branch.**
```bash
ruby helloworld-ruby.rb
```
Prints: `Hello World`

13
hello-world.rb Normal file
View file

@ -0,0 +1,13 @@
# https://stackoverflow.com/questions/705729/how-do-i-create-a-ruby-hello-world#705754
class HelloWorld
def initialize(name)
@name = name.capitalize
end
def sayHi
puts "Hello #{@name}!"
end
end
hello = HelloWorld.new("World")
hello.sayHi