From: Caleb Clausen on
On 5/25/10, Tony Arcieri <tony.arcieri(a)medioh.com> wrote:
> If you'd like to include some data inline with your code, you can do it like
> this:
>
> puts DATA
>
> __END__
> Look at me, I'm some data!
>
> The DATA constant will be populated with whatever text remains after __END__

However, you should be aware that this only works for the 'main' file
(which one was mentioned on the ruby command line). Other files which
are pulled in via require or load will not be able to get at trailing
data via __END__/DATA.