1. Home
  2. Computing & Technology
  3. Ruby

An Introduction to Shoes- -Using Shoes for Online Applications

By , About.com Guide

2 of 3

Hello World

The example application below is a simple "Hello World" type program. It will simply display the message "Hello World" in a window. Note that there is no shebang line (#!/usr/bin/env ruby) as this is intended to be run from Shoes itself, as is common with Shoes programs.

Shoes.app :width => 200, :height => 140 do
  para "Hello World!"
end

The Shoes.app method call encapsulates the entire Shoes application. The parameters passed to it are the width and height of the window in pixels. Inside are all things you'll see inside of the application window. In this case, a para (or "paragraph") displays the text "Hello World."

Explore Ruby
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Ruby
  4. GUI
  5. Shoes
  6. Hello World

©2009 About.com, a part of The New York Times Company.

All rights reserved.