%PDF- %PDF-
Direktori : /opt/alt/ruby18/lib64/ruby/gems/1.8/doc/rack-1.6.1/ri/Rack/Builder/ |
Current File : //opt/alt/ruby18/lib64/ruby/gems/1.8/doc/rack-1.6.1/ri/Rack/Builder/cdesc-Builder.yaml |
--- !ruby/object:RI::ClassDescription attributes: [] class_methods: - !ruby/object:RI::MethodSummary name: app - !ruby/object:RI::MethodSummary name: new - !ruby/object:RI::MethodSummary name: new_from_string - !ruby/object:RI::MethodSummary name: parse_file comment: - !ruby/struct:SM::Flow::P body: Rack::Builder implements a small DSL to iteratively construct Rack applications. - !ruby/struct:SM::Flow::P body: "Example:" - !ruby/struct:SM::Flow::VERB body: " require 'rack/lobster'\n app = Rack::Builder.new do\n use Rack::CommonLogger\n use Rack::ShowExceptions\n map "/lobster" do\n use Rack::Lint\n run Rack::Lobster.new\n end\n end\n\n run app\n" - !ruby/struct:SM::Flow::P body: Or - !ruby/struct:SM::Flow::VERB body: " app = Rack::Builder.app do\n use Rack::CommonLogger\n run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }\n end\n\n run app\n" - !ruby/struct:SM::Flow::P body: <tt>use</tt> adds middleware to the stack, <tt>run</tt> dispatches to an application. You can use <tt>map</tt> to construct a Rack::URLMap in a convenient way. constants: [] full_name: Rack::Builder includes: [] instance_methods: - !ruby/object:RI::MethodSummary name: call - !ruby/object:RI::MethodSummary name: map - !ruby/object:RI::MethodSummary name: run - !ruby/object:RI::MethodSummary name: to_app - !ruby/object:RI::MethodSummary name: use - !ruby/object:RI::MethodSummary name: warmup name: Builder superclass: Object