Module: RSolr
- Extended by:
- Char
- Defined in:
- lib/rsolr.rb
Defined Under Namespace
Modules: Adapter, Char Classes: Connection, Message, RequestError
Constant Summary collapse
- VERSION =
'0.8.2'
Class Method Summary collapse
-
.connect(options = {}) ⇒ Object
factory for creating connections “options” is a hash that gets used by the Connection object AND the adapter object.
Methods included from Char
Class Method Details
.connect(options = {}) ⇒ Object
factory for creating connections “options” is a hash that gets used by the Connection object AND the adapter object.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rsolr.rb', line 20 def self.connect(={}) adapter_name = [:adapter] ||= :http types = { :http=>'HTTP', :direct=>'Direct' } adapter_class = RSolr::Adapter.const_get(types[adapter_name]) adapter = adapter_class.new() RSolr::Connection.new(adapter, ) end |