Newbie: pipe

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

check this link out, it gives some good examples:
http://www.xs4all.nl/~jjacobs/rubyfaq-5.html

LuCa

John G. [email protected] 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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs