Class: OpenSearch::CLI
- Inherits:
-
OptionParser
- Object
- OptionParser
- OpenSearch::CLI
- Defined in:
- lib/opensearch/cli.rb
Constant Summary collapse
- VERSION =
"1.0.1"
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize(banner = nil, width = 32, indent = " " * 4) {|_self| ... } ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(banner = nil, width = 32, indent = " " * 4) {|_self| ... } ⇒ CLI
Returns a new instance of CLI.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/opensearch/cli.rb', line 11 def initialize( = nil, width = 32, indent = " " * 4, &block) @opensearch_options = { host: "https://localhost:9200", transport_options: {ssl: {}} } super {} yield(self) if block end |
Instance Method Details
#client ⇒ Object
23 24 25 26 |
# File 'lib/opensearch/cli.rb', line 23 def client require "opensearch" @client ||= OpenSearch::Client.new(@opensearch_options) end |