On 12 Νοε 2013, at 09:44 , AR (aka AleiPhoenix) [email protected]
wrote:
Hi, list
I’m wondering what does double @ sign after END syntax meaning like in this
file[1]
Generally speaking it’s a class variable.
In this context (sinatra classic) @@index marks the index HTML page
structure in ‘erb’ (note line 12… erb :index) which you will see when
you access the ‘index.html’ page.
You probably know that in Ruby the content after an END token is
available via the DATA filehandle… as long as you are in the main file
passed to Ruby to execute.
Sinatra extends this idea to other files to offer inline templates,
processing END by hand:
Then, it evaluates the text accordingly.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.