Class: OpenSearch::CLI
- Inherits:
-
OptionParser
- Object
- OptionParser
- OpenSearch::CLI
- Defined in:
- lib/opensearch/cli.rb
Constant Summary collapse
- VERSION =
"1.0.0"
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.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/opensearch/cli.rb', line 10 def initialize( = nil, width = 32, indent = " " * 4, &block) @opensearch_options = { host: "https://localhost:9200", transport_options: {ssl: {}} } super(, width, indent) {} yield(self) if block end |
Instance Method Details
#client ⇒ Object
22 23 24 25 |
# File 'lib/opensearch/cli.rb', line 22 def client require "opensearch" @client ||= OpenSearch::Client.new(@opensearch_options) end |