[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

newbie: pipe

John Giles

11/19/2006 9:11:00 PM

Hi,

Im pretty new to programming in general and ruby is only the second
language that ive taken on. ive been reading around looking at code
examples etc.. and something that keeps coming up is pipe ie:
|something_in_here|. Could someone give an example of how this works and
what it exactly does because ive never seen it before and google isnt
helping.

Thanks,

John

--
Posted via http://www.ruby-....

2 Answers

David Kastrup

11/19/2006 9:17:00 PM

0

John Giles <clonmelog@yahoo.co.uk> writes:

> Im pretty new to programming in general and ruby is only the second
> language that ive taken on. ive been reading around looking at code
> examples etc.. and something that keeps coming up is pipe ie:
> |something_in_here|. Could someone give an example of how this works and
> what it exactly does because ive never seen it before and google
> isnt helping.

It is declaring an argument to a block. If you have never seen it
before, you should shred your introduction to Ruby. But it sounds
like you already did, and that might be your problem.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum

Luca Scaljery

11/19/2006 9:34:00 PM

0

check this link out, it gives some good examples:
http://www.xs4all.nl/~jjacobs/ruby...

LuCa

--
Posted via http://www.ruby-....