simplify ruby - using classes is overkill

This commit is contained in:
Chris Wanstrath
2008-07-25 17:27:37 -07:00
parent 3e8e8cefaa
commit bb19ce29ab
2 changed files with 1 additions and 17 deletions

16
ruby.rb
View File

@@ -1,16 +1,2 @@
#!/usr/bin/ruby
class Hello
def initialize
@message = "Hello World!"
end
def say_hi
puts @message
end
end
h = Hello.new
h.say_hi
puts "Hello World"

View File

@@ -1,2 +0,0 @@
#!/usr/bin/ruby
puts "Hello World"