Derleth
12-16-2002, 09:43 AM
A test of some things I haven't had a chance to see for myself in the wild.
Lorem ipsum dolorem est,
Tora-Bora Budapest!
Vatis innem? Causin dux.
Fiat homin, cowsin lux.
TomatoText Courier test Huge test. My email address. (libertarian@onewest.net)
#!/usr/bin/ruby
class Greet
def initialize(name)
@name = name
end
def to_s
"Hello, #{@name}!"
end
end
hi_mom = Greet.new("Mom")
trad = Greet.new("world")
west_coast = Greet.new("sailor")
puts hi_mom.to_s
puts trad
puts "#{west_coast}"Ruby is my favorite OO language. :)
(Example made needlessly complex to show off OO functionality.)
Output:Hello, Mom!
Hello, world!
Hello, sailor!
Lorem ipsum dolorem est,
Tora-Bora Budapest!
Vatis innem? Causin dux.
Fiat homin, cowsin lux.
TomatoText Courier test Huge test. My email address. (libertarian@onewest.net)
#!/usr/bin/ruby
class Greet
def initialize(name)
@name = name
end
def to_s
"Hello, #{@name}!"
end
end
hi_mom = Greet.new("Mom")
trad = Greet.new("world")
west_coast = Greet.new("sailor")
puts hi_mom.to_s
puts trad
puts "#{west_coast}"Ruby is my favorite OO language. :)
(Example made needlessly complex to show off OO functionality.)
Output:Hello, Mom!
Hello, world!
Hello, sailor!