Class: Sophos::API
- Inherits:
-
Object
- Object
- Sophos::API
- Includes:
- Authentication, Configuration, WrAPI::Connection, WrAPI::Request
- Defined in:
- lib/sophos/api.rb
Direct Known Subclasses
Constant Summary
Constants included from Configuration
Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_ID_ENDPOINT, Configuration::DEFAULT_PAGE_SIZE, Configuration::DEFAULT_PAGINATION, Configuration::DEFAULT_UA, Configuration::VALID_OPTIONS_KEYS
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(options = {}) ⇒ API
constructor
Creates a new API and copies settings from singleton.
Methods included from Authentication
Methods included from Configuration
Constructor Details
#initialize(options = {}) ⇒ API
Creates a new API and copies settings from singleton
13 14 15 16 17 18 |
# File 'lib/sophos/api.rb', line 13 def initialize( = {}) = Sophos..merge() Configuration::VALID_OPTIONS_KEYS.each do |key| send("#{key}=", [key]) end end |
Instance Method Details
#config ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/sophos/api.rb', line 20 def config conf = {} Configuration::VALID_OPTIONS_KEYS.each do |key| conf[key] = send key end conf end |