View Problem
OOP

Define a class

Declare a class named Greeter that takes a string on creation and greets using this string if you call the "greet" method.
DiskEdit
ruby
class Greeter
def initialize(whom) @whom = whom end
def greet() puts "Hello, #{@whom}!" end
end

(Greeter.new("world")).greet()

Submit a new solution for ruby
There are 21 other solutions in additional languages (clojure, cpp, csharp, erlang ...)