Topic: Help with ruby syntax from rails guides
Hi
I cannot understand what the code of this function does, could anyone help me with it?
The obscure parts are:
@app||= begin...end (does it mean that if @app does not exist the block is run?)
and
app ,options = rack::builder... line (whith the comma, so what is it? A couple? I cannot understand the sense...)
this is the code
def app
@app ||= begin
if !::File.exist? options[:config]
abort "configuration #{options[:config]} not found"
end
app, options = Rack::Builder.parse_file(self.options[:config], opt_parser)
self.options.merge! options
app
end
endThank you in advance
Marco