Class: Webmachine::Adapters::Mongrel
- Inherits:
-
Webmachine::Adapter
- Object
- Webmachine::Adapter
- Webmachine::Adapters::Mongrel
- Defined in:
- lib/webmachine/adapters/mongrel.rb
Overview
Connects Webmachine to Mongrel.
Defined Under Namespace
Classes: Handler, RequestBody
Instance Attribute Summary
Attributes inherited from Webmachine::Adapter
Instance Method Summary collapse
-
#run ⇒ Object
Starts the Mongrel adapter.
Methods inherited from Webmachine::Adapter
Constructor Details
This class inherits a constructor from Webmachine::Adapter
Instance Method Details
#run ⇒ Object
Starts the Mongrel adapter
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/webmachine/adapters/mongrel.rb', line 15 def run defaults = { :port => configuration.port, :host => configuration.ip, :dispatcher => dispatcher }.merge(configuration.) config = ::Mongrel::Configurator.new(defaults) do listener do uri '/', :handler => Webmachine::Adapters::Mongrel::Handler.new(defaults[:dispatcher]) end trap("INT") { stop } run end config.join end |