Get a rack adapter by id.
id<String> |
The identifier of the Rack adapter class to retrieve. |
The adapter class. |
:api: private
# File lib/merb-core/rack/adapter.rb, line 16 def get(id) if @adapters[id.to_s] Object.full_const_get(@adapters[id.to_s]) else Merb.fatal! "The adapter #{id} did not exist" end end
Registers a new Rack adapter.
ids<Array> |
Identifiers by which this adapter is recognized by. |
adapter_class<Class> |
The Rack adapter class. |
:api: plugin
# File lib/merb-core/rack/adapter.rb, line 31 def register(ids, adapter_class) @adapters ||= Hash.new ids.each { |id| @adapters[id] = "Merb::Rack::#{adapter_class}" } end
Generated with the Darkfish Rdoc Generator 2.