# Re: Newbie ahead!: Ruby-Demo

**URL:** <https://www.ruby-forum.com/t/re-newbie-ahead-ruby-demo/52955>\
**Category:** Ruby\
**Created:** [January 21, 2006, 7:01am UTC](https://www.ruby-forum.com/t/re-newbie-ahead-ruby-demo/52955 "2006-01-21T07:01:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeSSSSaS\_Botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ecd19e/32.png) [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Post date:** [January 21, 2006, 7:01am UTC](https://www.ruby-forum.com/t/re-newbie-ahead-ruby-demo/52955/1 "2006-01-21T07:01:58Z")

</div>

Meino Christian C. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] :

# 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  
or  
codeB. 100.times{ puts “Hello, world.”}  
audience comment: coool…l 🙂

Way 3. print helloworld to pdf.  
code: require “pdf/writer”  
pdf = PDF::Writer.new  
pdf.select\_font “Times-Roman”  
100.times {pdf.text “Hello, world.”}  
pdf.save\_as(“hello.pdf”)  
audience comment: …cannot comment… audience rotfl…
