Class: DruidClient::Api::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/druid_client/api/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(druid_config:) ⇒ Client

Returns a new instance of Client.



12
13
14
15
# File 'lib/druid_client/api/client.rb', line 12

def initialize(druid_config:)
  @druid_config = druid_config
  @druid_config.verify!
end

Instance Attribute Details

#druid_configObject (readonly)

Returns the value of attribute druid_config.



10
11
12
# File 'lib/druid_client/api/client.rb', line 10

def druid_config
  @druid_config
end

Class Method Details

.buildObject



26
27
28
29
# File 'lib/druid_client/api/client.rb', line 26

def build(**)
  druid_config = DruidConfig.new(**)
  new(druid_config: druid_config)
end

Instance Method Details

#rest_clientObject



21
22
23
# File 'lib/druid_client/api/client.rb', line 21

def rest_client
  @rest_client ||= RestClient.new(druid_config)
end

#sqlObject



17
18
19
# File 'lib/druid_client/api/client.rb', line 17

def sql
  @sql ||= Api::Sql.new(rest_client: rest_client)
end