Class: Webmachine::Adapters::RackMapped

Inherits:
Rack show all
Defined in:
lib/webmachine/adapters/rack_mapped.rb

Overview

Provides the same functionality as the parent Webmachine::Adapters::Rack adapter, but allows the Webmachine application to be hosted at an arbitrary path in a parent Rack application (as in Rack map or Rails routing mount)

This functionality is separated out from the parent class to preserve backward compatibility in the behaviour of the parent Rack adpater.

To use the adapter in a parent Rack application, map the Webmachine application as follows in a rackup file or Rack::Builder:

map '/foo' do
  run SomeotherRackApp

  map '/bar' do
    run MyWebmachineApp.adapter
  end
end

Constant Summary

Constants inherited from Rack

Webmachine::Adapters::Rack::DEFAULT_OPTIONS, Webmachine::Adapters::Rack::NEWLINE, Webmachine::Adapters::Rack::REQUEST_URI, Webmachine::Adapters::Rack::VERSION_STRING

Instance Attribute Summary

Attributes inherited from Webmachine::Adapter

#application

Method Summary

Methods inherited from Rack

#call, #run

Methods inherited from Webmachine::Adapter

#initialize, run, #run

Constructor Details

This class inherits a constructor from Webmachine::Adapter