Skip to content

Commit 3c95de6

Browse files
committed
[MODEL] Added Adapter.register and Adapter.adapters shortcut methods
1 parent c16b07f commit 3c95de6

File tree

1 file changed

+8
-0
lines changed
  • elasticsearch-model/lib/elasticsearch/model

1 file changed

+8
-0
lines changed

elasticsearch-model/lib/elasticsearch/model/adapter.rb

+8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ def from_class(klass)
55
Adapter.new(klass)
66
end; module_function :from_class
77

8+
def adapters
9+
Adapter.adapters
10+
end; module_function :adapters
11+
12+
def register(name, condition)
13+
Adapter.register(name, condition)
14+
end; module_function :register
15+
816
class Adapter
917
attr_reader :klass
1018

0 commit comments

Comments
 (0)