Class: OpenSearch::Client
Constant Summary
Constants included from API
API::COMMON_PARAMS, API::COMMON_QUERY_PARAMS, API::DEFAULT_DOC, API::DEFAULT_SERIALIZER, API::HTTP_DELETE, API::HTTP_GET, API::HTTP_HEAD, API::HTTP_PATCH, API::HTTP_POST, API::HTTP_PUT, API::UNDERSCORE_ALL, API::UNDERSCORE_SEARCH
Instance Attribute Summary collapse
-
#transport ⇒ Object
Returns the value of attribute transport.
Instance Method Summary collapse
-
#initialize(arguments = {}, &block) ⇒ Client
constructor
See OpenSearch::Transport::Client for initializer parameters.
- #method_missing(name, *args, &block) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Methods included from API
included, serializer, settings
Constructor Details
#initialize(arguments = {}, &block) ⇒ Client
See OpenSearch::Transport::Client for initializer parameters
40 41 42 43 |
# File 'lib/opensearch.rb', line 40 def initialize(arguments = {}, &block) @verified = false @transport = OpenSearch::Transport::Client.new(arguments, &block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
45 46 47 48 49 |
# File 'lib/opensearch.rb', line 45 def method_missing(name, *args, &block) return super unless name == :perform_request verify_open_search unless @verified @transport.perform_request(*args, &block) end |
Instance Attribute Details
#transport ⇒ Object
Returns the value of attribute transport.
37 38 39 |
# File 'lib/opensearch.rb', line 37 def transport @transport end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
51 52 53 |
# File 'lib/opensearch.rb', line 51 def respond_to_missing?(method_name, include_private = false) method_name == :perform_request || super end |