From d4a51a859d7259714644ff3f7e8107cc5e6fcfba Mon Sep 17 00:00:00 2001 From: Mike Green Date: Wed, 23 Jul 2008 10:30:18 -0400 Subject: [PATCH] created a Bash Hello World script, made the Ruby script more Object Oriented --- bash.sh | 3 +++ ruby.rb | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 bash.sh diff --git a/bash.sh b/bash.sh new file mode 100644 index 00000000..3e7c682f --- /dev/null +++ b/bash.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "Hello World!"; \ No newline at end of file diff --git a/ruby.rb b/ruby.rb index 2beb1f22..c56baa23 100644 --- a/ruby.rb +++ b/ruby.rb @@ -1,2 +1,16 @@ #!/usr/bin/ruby -puts "Hello World" + +class Hello + + def initialize + @message = "Hello World!" + end + + def say_hi + puts @message + end + +end + +h = Hello.new +h.say_hi