1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Text and Paragraphs


2 of 4

Arguments to para
Text and Paragraphs

The para method can take multiple arguments. Each argument will append to the paragraph being built. This is an important concept, since not only does it allow you to break long paragraphs up into chunks (that fit into your Ruby program easily), but it also allows you to insert the formatting elements demonstrated in the next step.

Shoes.app :width => 400, :height => 340 do
  stack do
    para "If you pass multiple arguments ",
      "to the para method, they are combined ",[br ] "into a single paragraph."

    para "This second paragraph is separate ",
      "from the first."
  1. About.com
  2. Technology
  3. Ruby
  4. Graphical User Interfaces
  5. Shoes
  6. Arguments to para

©2014 About.com. All rights reserved.