Class: DruidClient::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/druid_client/cli.rb,
lib/druid_client/cli/sql.rb

Defined Under Namespace

Classes: Sql

Instance Method Summary collapse

Constructor Details

#initialize(options: {}) ⇒ Cli

Returns a new instance of Cli.



8
9
10
# File 'lib/druid_client/cli.rb', line 8

def initialize(options: {})
  @options = options
end

Instance Method Details

#clientObject



16
17
18
19
20
21
22
# File 'lib/druid_client/cli.rb', line 16

def client
  @client ||= DruidClient::Api.new(
      url: @options[:url],
      username: @options[:username],
      password: @options[:password],
  )
end

#sqlObject



12
13
14
# File 'lib/druid_client/cli.rb', line 12

def sql
  @sql ||= Cli::Sql.new(parent: self)
end