Class: Xapit::Client::AbstractModelAdapter
- Inherits:
-
Object
- Object
- Xapit::Client::AbstractModelAdapter
show all
- Defined in:
- lib/xapit/client/model_adapters/abstract_model_adapter.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AbstractModelAdapter.
25
26
27
|
# File 'lib/xapit/client/model_adapters/abstract_model_adapter.rb', line 25
def initialize(model_class)
@model_class = model_class
end
|
Class Method Details
.adapter_class(model_class) ⇒ Object
9
10
11
|
# File 'lib/xapit/client/model_adapters/abstract_model_adapter.rb', line 9
def self.adapter_class(model_class)
@@subclasses.detect { |subclass| subclass.for_class?(model_class) } || DefaultModelAdapter
end
|
.for_class?(model_class) ⇒ Boolean
13
14
15
|
# File 'lib/xapit/client/model_adapters/abstract_model_adapter.rb', line 13
def self.for_class?(model_class)
false end
|
.inherited(subclass) ⇒ Object
4
5
6
7
|
# File 'lib/xapit/client/model_adapters/abstract_model_adapter.rb', line 4
def self.inherited(subclass)
@@subclasses ||= []
@@subclasses << subclass
end
|
Instance Method Details
#index_all ⇒ Object
21
22
23
|
# File 'lib/xapit/client/model_adapters/abstract_model_adapter.rb', line 21
def index_all
end
|
#setup ⇒ Object
17
18
19
|
# File 'lib/xapit/client/model_adapters/abstract_model_adapter.rb', line 17
def setup
end
|