Sha256: b211b11f04e000e92017bf7bbf66397f05661de887cd8f850b18248a496f4721
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
# Pre-define the inheritance so Ruby doesn't complain # on import. require 'simple_solr_client/client' require 'simple_solr_client/schema' module SimpleSolrClient class Core < Client end end require 'simple_solr_client/core/admin' require 'simple_solr_client/core/core_data' require 'simple_solr_client/core/index' require 'simple_solr_client/core/search' class SimpleSolrClient::Core include SimpleSolrClient::Core::Admin include SimpleSolrClient::Core::CoreData include SimpleSolrClient::Core::Index include SimpleSolrClient::Core::Search attr_reader :core alias_method :name, :core def initialize(url, core) super(url) @core = core end # Override #url so we're now talking to the core def url(*args) [@base_url, @core, *args].join('/').chomp('/') end # Send JSON to this core's update/json handler def update(object_to_post, response_type = nil) post_json('update/json', object_to_post, response_type) end def schema @schema ||= SimpleSolrClient::Schema.new(self) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_solr_client-0.1.2 | lib/simple_solr_client/core.rb |