Class: Merb::Rack::Adapter
Class Method Summary collapse
-
.get(id) ⇒ Object
Parameters id<String>:: The identifier of the Rack adapter class to retrieve.
-
.register(ids, adapter_class) ⇒ Object
Registers a new Rack adapter.
Class Method Details
.get(id) ⇒ Object
Parameters
- id<String>
-
The identifier of the Rack adapter class to retrieve.
Returns.
- Class
-
The adapter class.
13 14 15 |
# File 'lib/merb-core/rack/adapter.rb', line 13 def get(id) Object.full_const_get(@adapters[id]) end |
.register(ids, adapter_class) ⇒ Object
Registers a new Rack adapter.
Parameters
- ids<Array>
-
Identifiers by which this adapter is recognized by.
- adapter_class<Class>
-
The Rack adapter class.
22 23 24 25 |
# File 'lib/merb-core/rack/adapter.rb', line 22 def register(ids, adapter_class) @adapters ||= Hash.new ids.each { |id| @adapters[id] = "Merb::Rack::#{adapter_class}" } end |