14 May '12, 12am

Jay Fields' Thoughts: Ruby: Multiline strings - here doc or quotes:

Ruby supports multiline strings by providing two types of here doc syntax. The first syntax uses and additional dash, but allows you to indent the "end of here doc" delimiter ('eos' in the example). <<-eos Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. eos Another here doc syntax doesn't require you to use the dash, but it does require that the "end of here doc" delimiter is in column 1 (or there are no spaces that precede it). <<eos Lorem ipsum dolor sit amet, consectetur adipisi...

Full article: http://blog.jayfields.com/2006/12/ruby-multiline-strings-...

Tweets

Ruby Inside - - is 6 years old today. Well.. th...

rubyinside.com 13 May '12, 7pm

Oops! I forgot to post the weekly Ruby news updates from Ruby Weekly to Ruby Inside in February so.. here’s a mega roundup...

No Strings Attached:

No Strings Attached:

mislav.uniqpath.com 18 May '12, 10pm

I make the Internet. Originally from Zagreb, Croatia , I'm lately migrating from place to place. I do open-source projects...

Watch Appboy cofounder @jon_hyman explain how we use @engineyard to scale quickly!

Watch Appboy cofounder @jon_hyman explain how w...

engineyard.com 23 May '12, 1pm

See how Appboy uses Engine Yard to scale quickly as their customers' applications grow “ We’re growing fast, and Engine Ya...