# File lib/rack/builder.rb, line 27 27: def self.parse_file(config, opts = Server::Options.new) 28: options = {} 29: if config =~ /\.ru$/ 30: cfgfile = ::File.read(config) 31: if cfgfile[/^#\\(.*)/] && opts 32: options = opts.parse! $1.split(/\s+/) 33: end 34: cfgfile.sub!(/^__END__\n.*/, '') 35: app = eval "Rack::Builder.new {( " + cfgfile + "\n )}.to_app", 36: TOPLEVEL_BINDING, config 37: else 38: require config 39: app = Object.const_get(::File.basename(config, '.rb').capitalize) 40: end 41: return app, options 42: end