First ruby script

Well technically not my first, but the first ive written from scratch. Its just a simple hello world example. Im going to try to extend it to do more now.
Heres what it currently looks like.

#!/usr/bin/ruby
# first cut of a ruby script
require ‘cgi’

# create a cgi object of type html 4
cgi = CGI.new(“html4”)
cgi.out {
cgi.html {
cgi.body {
cgi.h1 { “Hello Ruby!” }
}
}
}

And here is what it does.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s