Class Merb::Rack::Runner
In: merb-core/lib/merb-core/rack/adapter/runner.rb
Parent: Object

Methods

start  

Public Class methods

Parameters

opts<Hash>:Options for the runner (see below).

Options (opts)

:runner_code<String>:The code to run.

Notes

If opts[:runner_code] matches a filename, that file will be read and the contents executed. Otherwise the code will be executed directly.

:api: plugin

[Source]

    # File merb-core/lib/merb-core/rack/adapter/runner.rb, line 17
17:       def self.start(opts={})
18:         Merb::Server.change_privilege
19:         if opts[:runner_code]
20:           if File.exists?(opts[:runner_code])
21:             eval(File.read(opts[:runner_code]), TOPLEVEL_BINDING, __FILE__, __LINE__)
22:           else
23:             eval(opts[:runner_code], TOPLEVEL_BINDING, __FILE__, __LINE__)
24:           end
25:           exit
26:         end  
27:       end

[Validate]