Class: Wazuh::Client
- Inherits:
-
Object
- Object
- Wazuh::Client
- Includes:
- Sawyer::Connection, Sawyer::Request
- Defined in:
- lib/wazuh/client.rb
Constant Summary
Constants included from Sawyer::Request
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Sawyer::Request
#delete, #get, #offset_request, #post, #put
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/wazuh/client.rb', line 8 def initialize( = {}) Wazuh::Config::ATTRIBUTES.each do |key| send("#{key}=", [key] || Wazuh.config.send(key)) end @logger ||= Wazuh::Config.logger || Wazuh::Logger.default case api_version when 3 extend Api::Endpoints when 4 extend Api::Endpoints::V4 else raise "unsupported api version #{api_version}" end end |