Class: DruidClient::Api::Client
- Inherits:
-
Object
- Object
- DruidClient::Api::Client
- Defined in:
- lib/druid_client/api/client.rb
Instance Attribute Summary collapse
-
#druid_config ⇒ Object
readonly
Returns the value of attribute druid_config.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(druid_config:) ⇒ Client
constructor
A new instance of Client.
- #rest_client ⇒ Object
- #sql ⇒ Object
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_config ⇒ Object (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
.build ⇒ Object
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_client ⇒ Object
21 22 23 |
# File 'lib/druid_client/api/client.rb', line 21 def rest_client @rest_client ||= RestClient.new(druid_config) end |
#sql ⇒ Object
17 18 19 |
# File 'lib/druid_client/api/client.rb', line 17 def sql @sql ||= Api::Sql.new(rest_client: rest_client) end |