Re: Newbie ahead!: Ruby-Demo

Meino Christian C. [mailto:[email protected]] :

can someone point me to a ruby demo-script?

I want to show a friend the beauty of ruby and am myself fear if

would try my best would acchieve the opposite of what I want.

It dont need to do anything sophisticated it only should show the

Pros of programming in ruby…

Show “Hello, world.” in 3 ways.

Way 1. print hello world on screen.
code: puts “Hello, world.”
audience comment: hmmmm… ok…

Way 2. print helloworld 100 times
codeA. puts “Hello, world.\n” * 100
codeB. 100.times{ puts “Hello, world.”}
audience comment: coool…l :slight_smile:

Way 3. print helloworld to pdf.
code: require “pdf/writer”
pdf =
pdf.select_font “Times-Roman”
100.times {pdf.text “Hello, world.”}
audience comment: …cannot comment… audience rotfl…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs